Skip to content

Commit b4dcd6b

Browse files
author
Zhen Li
committed
Disable a few tests that are broken on 4.0 servers due to cypher not streaming records before error
1 parent ff000fc commit b4dcd6b

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

driver/src/test/java/org/neo4j/driver/integration/ResultStreamIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.neo4j.driver.Value;
3535
import org.neo4j.driver.exceptions.ClientException;
3636
import org.neo4j.driver.exceptions.NoSuchRecordException;
37+
import org.neo4j.driver.internal.util.Neo4jFeature;
3738
import org.neo4j.driver.summary.ResultSummary;
3839
import org.neo4j.driver.util.ParallelizableIT;
3940
import org.neo4j.driver.util.SessionExtension;
@@ -281,6 +282,7 @@ void shouldConvertImmediatelyFailingStatementResultToStream()
281282
}
282283

283284
@Test
285+
@DisabledOnNeo4jWith( Neo4jFeature.NO_STREAMING )
284286
void shouldConvertEventuallyFailingStatementResultToStream()
285287
{
286288
List<Integer> seen = new ArrayList<>();

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
import static org.neo4j.driver.internal.util.Matchers.arithmeticError;
9595
import static org.neo4j.driver.internal.util.Matchers.connectionAcquisitionTimeoutError;
9696
import static org.neo4j.driver.internal.util.Neo4jFeature.BOLT_V4;
97+
import static org.neo4j.driver.internal.util.Neo4jFeature.NO_STREAMING;
9798
import static org.neo4j.driver.util.DaemonThreadFactory.daemon;
9899
import static org.neo4j.driver.util.Neo4jRunner.DEFAULT_AUTH_TOKEN;
99100

@@ -864,6 +865,7 @@ void shouldNotRetryOnConnectionAcquisitionTimeout()
864865
}
865866

866867
@Test
868+
@DisabledOnNeo4jWith( NO_STREAMING )
867869
void shouldAllowConsumingRecordsAfterFailureInSessionClose()
868870
{
869871
Session session = neo4j.driver().session();

driver/src/test/java/org/neo4j/driver/integration/async/AsyncSessionIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
import static org.neo4j.driver.internal.util.Matchers.containsResultAvailableAfterAndResultConsumedAfter;
8181
import static org.neo4j.driver.internal.util.Matchers.syntaxError;
8282
import static org.neo4j.driver.internal.util.Neo4jFeature.BOLT_V3;
83+
import static org.neo4j.driver.internal.util.Neo4jFeature.NO_STREAMING;
8384
import static org.neo4j.driver.util.TestUtil.await;
8485
import static org.neo4j.driver.util.TestUtil.awaitAll;
8586

@@ -155,6 +156,7 @@ void shouldFailForIncorrectQuery()
155156
}
156157

157158
@Test
159+
@DisabledOnNeo4jWith( NO_STREAMING )
158160
void shouldFailWhenQueryFailsAtRuntime()
159161
{
160162
StatementResultCursor cursor = await( session.runAsync( "UNWIND [1, 2, 0] AS x RETURN 10 / x" ) );

driver/src/test/java/org/neo4j/driver/integration/reactive/RxStatementResultIT.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import org.neo4j.driver.Record;
2828
import org.neo4j.driver.exceptions.ClientException;
29+
import org.neo4j.driver.internal.util.DisabledOnNeo4jWith;
2930
import org.neo4j.driver.internal.util.EnabledOnNeo4jWith;
3031
import org.neo4j.driver.reactive.RxStatementResult;
3132
import org.neo4j.driver.reactive.RxSession;
@@ -44,6 +45,7 @@
4445
import static org.junit.jupiter.api.Assertions.assertTrue;
4546
import static org.neo4j.driver.Values.parameters;
4647
import static org.neo4j.driver.internal.util.Neo4jFeature.BOLT_V4;
48+
import static org.neo4j.driver.internal.util.Neo4jFeature.NO_STREAMING;
4749

4850
@EnabledOnNeo4jWith( BOLT_V4 )
4951
@ParallelizableIT
@@ -281,6 +283,7 @@ void shouldDiscardRecords()
281283
}
282284

283285
@Test
286+
@DisabledOnNeo4jWith( NO_STREAMING )
284287
void shouldStreamCorrectRecordsBackBeforeError()
285288
{
286289
RxSession session = neo4j.driver().rxSession();

driver/src/test/java/org/neo4j/driver/internal/util/Neo4jFeature.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
package org.neo4j.driver.internal.util;
2020

2121
import static java.util.Objects.requireNonNull;
22-
import static org.neo4j.driver.internal.util.ServerVersion.v3_1_0;
23-
import static org.neo4j.driver.internal.util.ServerVersion.v3_2_0;
2422
import static org.neo4j.driver.internal.util.ServerVersion.v3_4_0;
2523
import static org.neo4j.driver.internal.util.ServerVersion.v3_5_0;
2624
import static org.neo4j.driver.internal.util.ServerVersion.v4_0_0;
@@ -30,7 +28,8 @@ public enum Neo4jFeature
3028
SPATIAL_TYPES( v3_4_0 ),
3129
TEMPORAL_TYPES( v3_4_0 ),
3230
BOLT_V3( v3_5_0 ),
33-
BOLT_V4( v4_0_0 );
31+
BOLT_V4( v4_0_0 ),
32+
NO_STREAMING( v4_0_0 ); // the cypher cannot streaming records before error
3433

3534
private final ServerVersion availableFromVersion;
3635

0 commit comments

Comments
 (0)