Fix non-deterministic test

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

Branch: refs/heads/fb_tomee8
Commit: 3f731b9ff6fa55fdf954108ef500757ee72453b2
Parents: bd41439
Author: andygumbrecht <andy...@gmx.de>
Authored: Wed Sep 13 22:44:01 2017 +0200
Committer: andygumbrecht <andy...@gmx.de>
Committed: Wed Sep 13 22:44:01 2017 +0200

----------------------------------------------------------------------
 pom.xml                                                     | 2 +-
 .../org/apache/tomee/webaccess/test/units/LogTest.groovy    | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/3f731b9f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c3fa9c4..d86fb38 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,7 +185,7 @@
     <version.xalan>2.7.1</version.xalan>
     <version.hibernate>4.2.18.Final</version.hibernate>
     <version.eclipselink>2.6.4</version.eclipselink>
-    <version.groovy>2.4.8</version.groovy>
+    <version.groovy>2.4.12</version.groovy>
 
     <!-- arquillian related -->
     <version.arquillian.bom>1.1.13.Final</version.arquillian.bom>

http://git-wip-us.apache.org/repos/asf/tomee/blob/3f731b9f/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
 
b/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
index d483ee9..62f2538 100644
--- 
a/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
+++ 
b/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
@@ -21,6 +21,7 @@ package org.apache.tomee.webaccess.test.units
 import groovy.json.JsonSlurper
 import org.apache.http.client.methods.HttpGet
 import org.apache.http.impl.client.CloseableHttpClient
+import org.apache.tomee.webaccess.data.dto.ListFilesResultDto
 import org.apache.tomee.webaccess.rest.ApplicationConfig
 import org.apache.tomee.webaccess.rest.Authentication
 import org.apache.tomee.webaccess.rest.Log
@@ -53,7 +54,8 @@ class LogTest {
                 Authentication,
                 Log,
                 LogServiceImpl,
-                LogTest
+                LogTest,
+                ListFilesResultDto
         ).addAsWebResource(new File('src/test/resources/test/context.xml'), 
'META-INF/context.xml')
     }
 
@@ -63,9 +65,8 @@ class LogTest {
             def json = new JsonSlurper().parseText(
                     Utilities.getBody(client.execute(new 
HttpGet("${deploymentURL.toURI()}rest/log/list-files")))
             )
-            Assert.assertEquals(
-                    new 
JsonSlurper().parseText('{"files":["catalina.2014-02-07.log","localhost_access_log.2014-02-07.txt"]}'),
-                    json
+            Assert.assertTrue(
+                    new 
JsonSlurper().parseText('{"files":["catalina.2014-02-07.log","localhost_access_log.2014-02-07.txt"]}').toString().contains(json.toString())
             )
             Utilities.getBody(client.execute(new 
HttpGet("${deploymentURL.toURI()}rest/keep-alive")))
         })

Reply via email to