[ARVADOS] created: ea0de4d588c6eac28458fb20d70e008081f9ecbb

Git user git at public.curoverse.com
Thu Oct 13 13:35:25 EDT 2016


        at  ea0de4d588c6eac28458fb20d70e008081f9ecbb (commit)


commit ea0de4d588c6eac28458fb20d70e008081f9ecbb
Author: radhika <radhika at curoverse.com>
Date:   Thu Oct 13 13:22:51 2016 -0400

    10227: The diagnostics tests have been consistently failing since Sep 18th due to web sockets based refresh is not happening in the page.
    I updated the test to refresh the page in a loop until timeout, rather than rely on the unreliable web sockets.
    Also, updated the text_to_look_for to "completed" from "Complete" so that test doesn't misinterpret a job completion as the pipeline completion.

diff --git a/apps/workbench/test/diagnostics/pipeline_test.rb b/apps/workbench/test/diagnostics/pipeline_test.rb
index f9e324c..d038222 100644
--- a/apps/workbench/test/diagnostics/pipeline_test.rb
+++ b/apps/workbench/test/diagnostics/pipeline_test.rb
@@ -46,7 +46,7 @@ class PipelineTest < DiagnosticsTest
       page.assert_selector 'a,button', text: 'Pause'
 
       # Wait for pipeline run to complete
-      wait_until_page_has 'Complete', pipeline_config['max_wait_seconds']
+      wait_until_page_has 'completed', pipeline_config['max_wait_seconds']
     end
   end
 
diff --git a/apps/workbench/test/diagnostics_test_helper.rb b/apps/workbench/test/diagnostics_test_helper.rb
index c7433bb..3587721 100644
--- a/apps/workbench/test/diagnostics_test_helper.rb
+++ b/apps/workbench/test/diagnostics_test_helper.rb
@@ -24,9 +24,12 @@ class DiagnosticsTest < ActionDispatch::IntegrationTest
   # Looks for the text_to_look_for for up to the max_time provided
   def wait_until_page_has text_to_look_for, max_time=30
     max_time = 30 if (!max_time || (max_time.to_s != max_time.to_i.to_s))
+    text_found = false
     Timeout.timeout(max_time) do
-      loop until page.has_text?(text_to_look_for)
+      until text_found do
+        visit_page_with_token 'active', current_path
+        text_found = has_text?(text_to_look_for)
+      end
     end
   end
-
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list