groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [3/3] groovy git commit: Reduce sleep time to speed up test (closes #262)
Date Sun, 21 Feb 2016 14:07:59 GMT
Reduce sleep time to speed up test (closes #262)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/aa34ced6
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/aa34ced6
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/aa34ced6

Branch: refs/heads/GROOVY_2_4_X
Commit: aa34ced6e17977393f6adf3941606afc4de5bfc2
Parents: e9c3dcf
Author: John Wagenleitner <jwagenleitner@apache.org>
Authored: Sat Feb 13 09:32:45 2016 -0800
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Sun Feb 21 15:07:45 2016 +0100

----------------------------------------------------------------------
 src/spec/test/ClassDesignASTTransformsTest.groovy | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/aa34ced6/src/spec/test/ClassDesignASTTransformsTest.groovy
----------------------------------------------------------------------
diff --git a/src/spec/test/ClassDesignASTTransformsTest.groovy b/src/spec/test/ClassDesignASTTransformsTest.groovy
index 679bf73..0350fb9 100644
--- a/src/spec/test/ClassDesignASTTransformsTest.groovy
+++ b/src/spec/test/ClassDesignASTTransformsTest.groovy
@@ -334,7 +334,7 @@ import groovy.transform.Memoized
 // tag::memoized_long_computation[]
 long longComputation(int seed) {
     // slow computation
-    Thread.sleep(1000*seed)
+    Thread.sleep(100*seed)
     System.nanoTime()
 }
 // end::memoized_long_computation[]
@@ -352,13 +352,13 @@ import groovy.transform.Memoized
 @Memoized
 long longComputation(int seed) {
     // slow computation
-    Thread.sleep(1000*seed)
+    Thread.sleep(100*seed)
     System.nanoTime()
 }
 
-def x = longComputation(1) // returns after 1 second
+def x = longComputation(1) // returns after 100 milliseconds
 def y = longComputation(1) // returns immediatly
-def z = longComputation(2) // returns after 2 seconds
+def z = longComputation(2) // returns after 200 milliseconds
 assert x==y
 assert x!=z
 // end::memoized_long_computation_cached[]


Mime
View raw message