minitest: Fix sync issue on first run. Thread synchronization issue in connectSocket. Change-Id: Id622e89662fe3bf99e8a5ad96369ddcea7946160 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/plugins/org.eclipse.dltk.ruby.testing/testing/minitest/dltk_plugin.rb b/plugins/org.eclipse.dltk.ruby.testing/testing/minitest/dltk_plugin.rb index 54c3f03..4b3addf 100644 --- a/plugins/org.eclipse.dltk.ruby.testing/testing/minitest/dltk_plugin.rb +++ b/plugins/org.eclipse.dltk.ruby.testing/testing/minitest/dltk_plugin.rb
@@ -89,7 +89,7 @@ class DLTKReporter < Minitest::StatisticsReporter def start - connectSocket ENV[EnvVars::PORT].to_i + DLTKReporter.connectSocket ENV[EnvVars::PORT].to_i @testsByName = {} DLTKReporter.sendMessage MessageIds::TEST_RUN_START + 0.to_s + " v2" super @@ -106,7 +106,7 @@ DLTKReporter.sendMessage MessageIds::TEST_RUN_END + (@total_time.to_i * 1000).to_s end - def connectSocket(port) + def self.connectSocket(port) return false unless port > 0 #debug "Opening socket on #{port}" for i in 1..10