Skip to content

Commit be5c13d

Browse files
authored
Enable tests with custom fetch size in reactive backend (#1002)
Excluding negative fetch size values.
1 parent 891b6ae commit be5c13d

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/GetFeatures.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ public class GetFeatures implements TestkitRequest
4141
"Optimization:PullPipelining",
4242
"ConfHint:connection.recv_timeout_seconds",
4343
"Temporary:DriverFetchSize",
44-
"Temporary:DriverMaxTxRetryTime",
44+
"Temporary:DriverMaxTxRetryTime"
45+
) );
46+
47+
private static final Set<String> SYNC_FEATURES = new HashSet<>( Arrays.asList(
48+
"Temporary:TransactionClose",
4549
"Temporary:ResultList"
4650
) );
4751

48-
private static final Set<String> SYNC_FEATURES = new HashSet<>( Collections.singletonList(
49-
"Temporary:TransactionClose"
52+
private static final Set<String> ASYNC_FEATURES = new HashSet<>( Collections.singletonList(
53+
"Temporary:ResultList"
5054
) );
5155

5256
@Override
@@ -60,7 +64,9 @@ public TestkitResponse process( TestkitState testkitState )
6064
@Override
6165
public CompletionStage<TestkitResponse> processAsync( TestkitState testkitState )
6266
{
63-
return CompletableFuture.completedFuture( createResponse( COMMON_FEATURES ) );
67+
Set<String> features = new HashSet<>( COMMON_FEATURES );
68+
features.addAll( ASYNC_FEATURES );
69+
return CompletableFuture.completedFuture( createResponse( features ) );
6470
}
6571

6672
@Override

testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/StartTest.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public class StartTest implements TestkitRequest
5050
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.RoutingV3\\..*$", skipMessage );
5151
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestProtocolVersions\\.test_should_reject_server_using_verify_connectivity_bolt_3x0$", skipMessage );
5252
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestProtocolVersions\\.test_supports_bolt_3x0", skipMessage );
53+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationSessionRun\\.test_all_v3$", skipMessage );
54+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationSessionRun\\.test_discards_on_session_close$", skipMessage );
55+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationTxRun\\.test_batch_v3$", skipMessage );
56+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationTxRun\\.test_all_v3$", skipMessage );
5357

5458
// Current limitations (require further investigation or bug fixing)
5559
skipMessage = "Does not report RUN FAILURE";
@@ -76,15 +80,14 @@ public class StartTest implements TestkitRequest
7680
skipMessage );
7781
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.Routing[^.]+\\.test_should_retry_write_until_success_with_leader_change_using_tx_function$",
7882
skipMessage );
79-
skipMessage = "Custom fetch size not supported";
80-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.NoRouting[^.]+\\.test_should_accept_custom_fetch_size_using_driver_configuration$", skipMessage );
81-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.NoRouting[^.]+\\.test_should_pull_all_when_fetch_is_minus_one_using_driver_configuration", skipMessage );
82-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.NoRouting[^.]+\\.test_should_pull_custom_size_and_then_all_using_session_configuration$", skipMessage );
83-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.NoRouting[^.]+\\.test_should_accept_custom_fetch_size_using_session_configuration$", skipMessage );
84-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationSessionRun\\..*$", skipMessage );
85-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationTxRun\\..*$", skipMessage );
86-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestSessionRun\\..*$", skipMessage );
87-
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestTxRun\\.test_rollback_tx_on_session_close_consumed_result$", skipMessage );
83+
skipMessage = "Fetch size -1 not supported";
84+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.NoRouting[^.]+\\.test_should_pull_all_when_fetch_is_minus_one_using_driver_configuration$", skipMessage );
85+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationSessionRun\\.test_all$", skipMessage );
86+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationSessionRun\\.test_all_slow_connection$", skipMessage );
87+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationTxRun\\.test_all$", skipMessage );
88+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestIterationTxRun\\.test_all_slow_connection$", skipMessage );
89+
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.TestSessionRun\\.test_discard_on_session_close_unfinished_result$",
90+
"Does not support partially consumed state" );
8891
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.NoRouting[^.]+\\.test_should_error_on_database_shutdown_using_tx_run$", "Session close throws error" );
8992
REACTIVE_SKIP_PATTERN_TO_REASON.put( "^.*\\.Routing[^.]+\\.test_should_retry_write_until_success_with_leader_shutdown_during_tx_using_tx_function$",
9093
"Commit failure leaks outside function" );

0 commit comments

Comments
 (0)