You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/12/09 04:54:04 UTC

[groovy] branch master updated: Tweak `assertGinqScript`

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


The following commit(s) were added to refs/heads/master by this push:
     new 52399a8  Tweak `assertGinqScript`
52399a8 is described below

commit 52399a86341ca0d466915a781fd3f533d6991e15
Author: Daniel Sun <su...@apache.org>
AuthorDate: Wed Dec 9 12:53:40 2020 +0800

    Tweak `assertGinqScript`
---
 .../src/spec/test/org/apache/groovy/ginq/GinqTest.groovy       | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
index c4bec3f..ffdb1a5 100644
--- a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
+++ b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
@@ -3588,7 +3588,7 @@ class GinqTest {
     void "testGinq - optimize - 4"() {
         assertGinqScript '''
 // tag::ginq_optimize_01[]
-            assert [[2, 2]] == GQ(optimize:false) {
+            assert [[2, 2]] == GQ(optimize: false) {
                 from n1 in [1, 2, 3]
                 innerjoin n2 in [1, 2, 3] on n1 == n2
                 where n1 > 1 &&  n2 < 3
@@ -3769,10 +3769,8 @@ class GinqTest {
 
     private static void assertGinqScript(String script) {
         String newScript = script.replaceAll(/\bGQ\s*[{]/, 'GQ(optimize:false) {')
-        [newScript, script].collect { String c ->
-            Thread.start {
-                assertScript(c)
-            }
-        }*.join()
+        [newScript, script].each { String c ->
+            assertScript(c)
+        }
     }
 }