diff --git a/core/src/test/java/apoc/export/BigGraphTest.java b/core/src/test/java/apoc/export/BigGraphTest.java index c7ec22384..73653e8c6 100644 --- a/core/src/test/java/apoc/export/BigGraphTest.java +++ b/core/src/test/java/apoc/export/BigGraphTest.java @@ -108,7 +108,7 @@ public void testTerminateRenameNodeProp() { @Test public void testTerminateRenameType() { - checkTerminationGuard(db, "CALL apoc.refactor.rename.type('DIRECTED', 'DIRECTED_TWO')"); + checkTerminationGuard(db, 50L, "CALL apoc.refactor.rename.type('DIRECTED', 'DIRECTED_TWO')"); } @Test diff --git a/test-utils/src/main/java/apoc/util/TransactionTestUtil.java b/test-utils/src/main/java/apoc/util/TransactionTestUtil.java index c4ce6419e..739589b7f 100644 --- a/test-utils/src/main/java/apoc/util/TransactionTestUtil.java +++ b/test-utils/src/main/java/apoc/util/TransactionTestUtil.java @@ -80,9 +80,11 @@ public static void lastTransactionChecks(GraphDatabaseService db, String query, } public static void checkTransactionTime(long timeout, long timePassed) { - timePassed = (System.currentTimeMillis() - timePassed) / 1000; - assertTrue("The transaction hasn't been terminated before the timeout time, but after " + timePassed + " seconds", - timePassed <= timeout); + double timePassedDouble = (System.currentTimeMillis() - timePassed) / 1000.0; + + assertTrue("The transaction hasn't been terminated before the given timeout time (" + timeout + + "), but after " + timePassedDouble + " seconds", + timePassedDouble <= timeout); } public static void checkTransactionNotInList(GraphDatabaseService db, String query) {