Skip to content

Commit d717808

Browse files
author
Zhen
committed
Fix red build due to error message changes in 3.0 and 3.1
1 parent 4f069f0 commit d717808

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

driver/src/test/java/org/neo4j/driver/v1/integration/SessionIT.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.neo4j.driver.v1.Session;
2929
import org.neo4j.driver.v1.StatementResult;
3030
import org.neo4j.driver.v1.exceptions.ClientException;
31+
import org.neo4j.driver.v1.exceptions.Neo4jException;
3132
import org.neo4j.driver.v1.util.TestNeo4j;
3233

3334
import static org.hamcrest.CoreMatchers.equalTo;
@@ -112,15 +113,17 @@ public void shouldKillLongRunningStatement() throws Throwable
112113

113114
fail("Should have got an exception about statement get killed.");
114115
}
115-
catch( ClientException e )
116+
catch( Neo4jException e )
116117
{
117118
endTime = System.currentTimeMillis();
118-
assertThat( e.code(), equalTo("Neo.ClientError.Procedure.ProcedureCallFailed") );
119-
120119
assertTrue( startTime > 0 );
121120
assertTrue( endTime - startTime > killTimeout * 1000 ); // get killed by session.kill
122121
assertTrue( endTime - startTime < executionTimeout * 1000 / 2 ); // finished before execution finished
123122
}
123+
catch ( Exception e )
124+
{
125+
fail( "Should be a Neo4jException" );
126+
}
124127
}
125128

126129
@Test

0 commit comments

Comments
 (0)