This is an automated email from the ASF dual-hosted git repository. sunlan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 627869fd1e80dff34e66d228cf61675a055d83ce Author: Daniel.Sun <realblue...@hotmail.com> AuthorDate: Fri Oct 11 14:23:15 2019 +0800 Adjust sleep period in `CodeGenerationASTTransformsTest` --- src/spec/test/CodeGenerationASTTransformsTest.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/spec/test/CodeGenerationASTTransformsTest.groovy b/src/spec/test/CodeGenerationASTTransformsTest.groovy index d253bb2..b19775d 100644 --- a/src/spec/test/CodeGenerationASTTransformsTest.groovy +++ b/src/spec/test/CodeGenerationASTTransformsTest.groovy @@ -403,8 +403,10 @@ import groovy.transform.Immutable @Immutable class SlowHashCode { + static final SLEEP_PERIOD = 500 + int hashCode() { - sleep 100 + sleep SLEEP_PERIOD 127 } } @@ -420,7 +422,7 @@ p.hashCode() def start = System.currentTimeMillis() p.hashCode() -assert System.currentTimeMillis() - start < 100 +assert System.currentTimeMillis() - start < SlowHashCode.SLEEP_PERIOD // end::equalshashcode_example_cache[] ''' }