Browse Source

longer timeout for async sunit tests

Nicolas Petton 11 years ago
parent
commit
df530e72d7
3 changed files with 51 additions and 51 deletions
  1. 15 15
      js/SUnit-Tests.deploy.js
  2. 21 21
      js/SUnit-Tests.js
  3. 15 15
      st/SUnit-Tests.st

+ 15 - 15
js/SUnit-Tests.deploy.js

@@ -105,13 +105,13 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@flag"]="bad";
-_st(self)._timeout_((10));
+_st(self)._timeout_((30));
 self["@flag"]=_st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@flag"]="ok";
 self["@flag"];
 return _st(self)._error_("Intentional");
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeError",{},smalltalk.SUnitAsyncTest)})},
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"]}),
 smalltalk.SUnitAsyncTest);
@@ -123,11 +123,11 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@flag"]="bad";
-_st(self)._timeout_((10));
+_st(self)._timeout_((30));
 self["@flag"]=_st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self)._error_("Intentional");
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeErrorFailingInTearDown",{},smalltalk.SUnitAsyncTest)})},
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"]}),
 smalltalk.SUnitAsyncTest);
@@ -139,13 +139,13 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@flag"]="bad";
-_st(self)._timeout_((10));
+_st(self)._timeout_((30));
 self["@flag"]=_st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@flag"]="ok";
 self["@flag"];
 return _st(self)._assert_(false);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeFailure",{},smalltalk.SUnitAsyncTest)})},
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "assert:"]}),
 smalltalk.SUnitAsyncTest);
@@ -159,12 +159,12 @@ return smalltalk.withContext(function($ctx1) {
 _st(self)._timeout_((100));
 _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self)._timeout_((5));
+_st(self)._timeout_((20));
 return _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self)._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})})))._valueWithTimeout_((30));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutFailing",{},smalltalk.SUnitAsyncTest)})},
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]}),
 smalltalk.SUnitAsyncTest);
@@ -175,15 +175,15 @@ selector: "fakeMultipleTimeoutPassing",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._timeout_((10));
+_st(self)._timeout_((20));
 _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self)._timeout_((20));
+_st(self)._timeout_((40));
 return _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self)._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})})))._valueWithTimeout_((20));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutPassing",{},smalltalk.SUnitAsyncTest)})},
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]}),
 smalltalk.SUnitAsyncTest);
@@ -194,11 +194,11 @@ selector: "fakeTimeout",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._timeout_((4));
+_st(self)._timeout_((10));
 _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self)._finished();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeTimeout",{},smalltalk.SUnitAsyncTest)})},
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]}),
 smalltalk.SUnitAsyncTest);

+ 21 - 21
js/SUnit-Tests.js

@@ -142,16 +142,16 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@flag"]="bad";
-_st(self)._timeout_((10));
+_st(self)._timeout_((30));
 self["@flag"]=_st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@flag"]="ok";
 self["@flag"];
 return _st(self)._error_("Intentional");
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeError",{},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "fakeError\x0a\x09flag := 'bad'.\x0a\x09self timeout: 10.\x0a\x09flag := (self async: [ flag := 'ok'. self error: 'Intentional' ]) valueWithTimeout: 5",
+source: "fakeError\x0a\x09flag := 'bad'.\x0a\x09self timeout: 30.\x0a\x09flag := (self async: [ flag := 'ok'. self error: 'Intentional' ]) valueWithTimeout: 20",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"],
 referencedClasses: []
 }),
@@ -165,14 +165,14 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@flag"]="bad";
-_st(self)._timeout_((10));
+_st(self)._timeout_((30));
 self["@flag"]=_st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self)._error_("Intentional");
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeErrorFailingInTearDown",{},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "fakeErrorFailingInTearDown\x0a\x09flag := 'bad'.\x0a\x09self timeout: 10.\x0a\x09flag := (self async: [ self error: 'Intentional' ]) valueWithTimeout: 5",
+source: "fakeErrorFailingInTearDown\x0a\x09flag := 'bad'.\x0a\x09self timeout: 30.\x0a\x09flag := (self async: [ self error: 'Intentional' ]) valueWithTimeout: 20",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"],
 referencedClasses: []
 }),
@@ -186,16 +186,16 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 self["@flag"]="bad";
-_st(self)._timeout_((10));
+_st(self)._timeout_((30));
 self["@flag"]=_st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@flag"]="ok";
 self["@flag"];
 return _st(self)._assert_(false);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeFailure",{},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "fakeFailure\x0a\x09flag := 'bad'.\x0a\x09self timeout: 10.\x0a\x09flag := (self async: [ flag := 'ok'. self assert: false ]) valueWithTimeout: 5",
+source: "fakeFailure\x0a\x09flag := 'bad'.\x0a\x09self timeout: 30.\x0a\x09flag := (self async: [ flag := 'ok'. self assert: false ]) valueWithTimeout: 20",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "assert:"],
 referencedClasses: []
 }),
@@ -211,15 +211,15 @@ return smalltalk.withContext(function($ctx1) {
 _st(self)._timeout_((100));
 _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self)._timeout_((5));
+_st(self)._timeout_((20));
 return _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self)._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})})))._valueWithTimeout_((30));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutFailing",{},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "fakeMultipleTimeoutFailing\x0a\x09self timeout: 100.\x0a\x09(self async: [\x0a\x09\x09self timeout: 5.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 10\x0a\x09]) valueWithTimeout: 5",
+source: "fakeMultipleTimeoutFailing\x0a\x09self timeout: 100.\x0a\x09(self async: [\x0a\x09\x09self timeout: 20.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 30\x0a\x09]) valueWithTimeout: 20",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"],
 referencedClasses: []
 }),
@@ -232,18 +232,18 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._timeout_((10));
+_st(self)._timeout_((20));
 _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self)._timeout_((20));
+_st(self)._timeout_((40));
 return _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self)._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2)})})))._valueWithTimeout_((20));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutPassing",{},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "fakeMultipleTimeoutPassing\x0a\x09self timeout: 10.\x0a\x09(self async: [\x0a\x09\x09self timeout: 20.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 10\x0a\x09]) valueWithTimeout: 5",
+source: "fakeMultipleTimeoutPassing\x0a\x09self timeout: 20.\x0a\x09(self async: [\x0a\x09\x09self timeout: 40.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 20\x0a\x09]) valueWithTimeout: 10",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"],
 referencedClasses: []
 }),
@@ -256,14 +256,14 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self)._timeout_((4));
+_st(self)._timeout_((10));
 _st(_st(self)._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self)._finished();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((20));
 return self}, function($ctx1) {$ctx1.fill(self,"fakeTimeout",{},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "fakeTimeout\x0a\x09self timeout: 4.\x0a\x09(self async: [ self finished ]) valueWithTimeout: 5",
+source: "fakeTimeout\x0a\x09self timeout: 10.\x0a\x09(self async: [ self finished ]) valueWithTimeout: 20",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"],
 referencedClasses: []
 }),

+ 15 - 15
st/SUnit-Tests.st

@@ -61,41 +61,41 @@ TestCase subclass: #SUnitAsyncTest
 
 fakeError
 	flag := 'bad'.
-	self timeout: 10.
-	flag := (self async: [ flag := 'ok'. self error: 'Intentional' ]) valueWithTimeout: 5
+	self timeout: 30.
+	flag := (self async: [ flag := 'ok'. self error: 'Intentional' ]) valueWithTimeout: 20
 !
 
 fakeErrorFailingInTearDown
 	flag := 'bad'.
-	self timeout: 10.
-	flag := (self async: [ self error: 'Intentional' ]) valueWithTimeout: 5
+	self timeout: 30.
+	flag := (self async: [ self error: 'Intentional' ]) valueWithTimeout: 20
 !
 
 fakeFailure
 	flag := 'bad'.
-	self timeout: 10.
-	flag := (self async: [ flag := 'ok'. self assert: false ]) valueWithTimeout: 5
+	self timeout: 30.
+	flag := (self async: [ flag := 'ok'. self assert: false ]) valueWithTimeout: 20
 !
 
 fakeMultipleTimeoutFailing
 	self timeout: 100.
 	(self async: [
-		self timeout: 5.
-		(self async: [ self finished ]) valueWithTimeout: 10
-	]) valueWithTimeout: 5
+		self timeout: 20.
+		(self async: [ self finished ]) valueWithTimeout: 30
+	]) valueWithTimeout: 20
 !
 
 fakeMultipleTimeoutPassing
-	self timeout: 10.
+	self timeout: 20.
 	(self async: [
-		self timeout: 20.
-		(self async: [ self finished ]) valueWithTimeout: 10
-	]) valueWithTimeout: 5
+		self timeout: 40.
+		(self async: [ self finished ]) valueWithTimeout: 20
+	]) valueWithTimeout: 10
 !
 
 fakeTimeout
-	self timeout: 4.
-	(self async: [ self finished ]) valueWithTimeout: 5
+	self timeout: 10.
+	(self async: [ self finished ]) valueWithTimeout: 20
 ! !
 
 !SUnitAsyncTest methodsFor: 'private'!