From 18f4a94318e636216e22b545ee20f4fbb4b9910a Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Fri, 9 Aug 2024 09:47:34 -0400 Subject: [PATCH] attempt to fix flaky test (#3721) --- apps/dashboard/test/system/project_manager_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/test/system/project_manager_test.rb b/apps/dashboard/test/system/project_manager_test.rb index 66c0c4b001..f6fe41821c 100644 --- a/apps/dashboard/test/system/project_manager_test.rb +++ b/apps/dashboard/test/system/project_manager_test.rb @@ -941,9 +941,7 @@ def add_auto_environment_variable(project_id, script_id, save: true) find('i.fa-atom').click input_data = File.read('test/fixtures/projects/chemistry-5533/assignment_1.sh') - project_id = URI.parse(current_url).path.split('/').last - - # note that we're using pzs1715 from sacctmgr_show_accts_alt.txt instead of psz0175 + # NOTE: we're using pzs1715 from sacctmgr_show_accts_alt.txt instead of psz0175 # from the template. Open3 .stubs(:capture3) @@ -956,6 +954,10 @@ def add_auto_environment_variable(project_id, script_id, save: true) find("#launch_8woi7ghd").click assert_selector('.alert-success', text: 'job-id-123') + + # sleep here because this test can error with Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir + # something still has a hold on these files. + sleep 2 end end end