Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 27 Jul 2017 07:03:08 +0100
branchjv
changeset 1951 a073c5657e00
parent 1950 16ce4d7a555a (current diff)
parent 1642 281f5999cc6c (diff)
child 1952 2a5f8c52b7a1
Merge
--- a/RegressionTests__DelayTest.st	Thu Jun 15 16:41:57 2017 +0100
+++ b/RegressionTests__DelayTest.st	Thu Jul 27 07:03:08 2017 +0100
@@ -29,15 +29,17 @@
 test1
     |n verbose|
 
+    self skipIf: (OperatingSystem getEnvironment:'JOB_NAME') notNil description: 'This test depends on real time timing and thus unreliable under CI setups'.
+
     verbose := false.
 
     [
-	n := 0.
-	[n < 10] whileTrue:[
-	   Delay waitForSeconds:0.1.
-	   verbose ifTrue:[ Transcript showCR:n ].
-	   n := n + 1.
-	]
+        n := 0.
+        [n < 10] whileTrue:[
+           Delay waitForSeconds:0.1.
+           verbose ifTrue:[ Transcript showCR:n ].
+           n := n + 1.
+        ]
     ] forkAt:(Processor activePriority - 1).
 
     self assert:(n == nil).     "because the process has lower prio and should not run"
@@ -55,19 +57,22 @@
     "
 
     "Modified: / 10-01-2012 / 19:25:22 / cg"
+    "Modified: / 26-07-2017 / 11:49:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test2
     |n verbose|
 
+    self skipIf: (OperatingSystem getEnvironment:'JOB_NAME') notNil description: 'This test depends on real time timing and thus unreliable under CI setups'.
+
     verbose := false.
     n := 0.
     [
-	[n < 10] whileTrue:[
-	   Delay waitForSeconds:0.1.
-	   verbose ifTrue:[ Transcript showCR:n ].
-	   n := n + 1.
-	]
+        [n < 10] whileTrue:[
+           Delay waitForSeconds:0.1.
+           verbose ifTrue:[ Transcript showCR:n ].
+           n := n + 1.
+        ]
     ] forkAt:(Processor activePriority + 1).
 
     self assert:(n == 0) description:'thread with delays should not have started yet'.
@@ -79,6 +84,7 @@
     "
 
     "Modified: / 10-01-2012 / 19:25:35 / cg"
+    "Modified: / 26-07-2017 / 11:48:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test3_longDelay
@@ -87,11 +93,13 @@
 
     |stillWaiting watchDogBite|
 
+    self skipIf: (OperatingSystem getEnvironment:'JOB_NAME') notNil description: 'This test depends on real time timing and thus unreliable under CI setups'.
+
     [
-	watchDogBite := false.
-	stillWaiting := true.
-	Delay waitForSeconds:1000000.
-	stillWaiting := false.
+        watchDogBite := false.
+        stillWaiting := true.
+        Delay waitForSeconds:1000000.
+        stillWaiting := false.
     ] valueWithWatchDog:[ watchDogBite := true] afterMilliseconds:1000.
 
     self assert:stillWaiting.
@@ -102,6 +110,7 @@
     "
 
     "Created: / 31-07-2011 / 18:44:53 / cg"
+    "Modified: / 26-07-2017 / 11:49:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test4
@@ -109,17 +118,19 @@
 
     |longDelay waitTime watchDogBite|
 
+    self skipIf: (OperatingSystem getEnvironment:'JOB_NAME') notNil description: 'This test depends on real time timing and thus unreliable under CI setups'.
+
     longDelay := Delay forSeconds:1000000.
     [
-	Delay waitForSeconds:2.
-	longDelay resume.
+        Delay waitForSeconds:2.
+        longDelay resume.
     ] fork.
 
     waitTime := Time secondsToRun:[
-	"never wait longer than 10 seconds"
-	[
-	    longDelay wait.
-	] valueWithWatchDog:[ watchDogBite := true] afterMilliseconds:10000.
+        "never wait longer than 10 seconds"
+        [
+            longDelay wait.
+        ] valueWithWatchDog:[ watchDogBite := true] afterMilliseconds:10000.
     ].
     self assert:watchDogBite ~~ true.
     self assert:waitTime < 10.
@@ -127,11 +138,18 @@
     "
      self basicNew test4
     "
+
+    "Modified: / 26-07-2017 / 11:49:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !DelayTest class methodsFor:'documentation'!
 
 version
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !