File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
core/src/main/java/com/datastax/oss/driver/api/core/tracker
integration-tests/src/test/java/com/datastax/oss/driver/core/tracker Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ default Statement<?> getDecoratedStatement(
7575 // Add or overwrite
7676 existing .put (key , ByteBuffer .wrap (requestId .getBytes (StandardCharsets .UTF_8 )));
7777
78+ // Allowing null key/values
79+ // Wrap a map inside to be immutable without instanciating a new map
7880 Map <String , ByteBuffer > unmodifiableMap = Collections .unmodifiableMap (existing );
7981
8082 return statement .setCustomPayload (unmodifiableMap );
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ public void should_not_write_id_to_custom_payload_when_key_is_not_set() {
121121 try (CqlSession session = SessionUtils .newSession (ccmRule , loader )) {
122122 String query = "SELECT * FROM system.local" ;
123123 ResultSet rs = session .execute (query );
124- assertThat (rs .getExecutionInfo ().getRequest ().getCustomPayload ().get ("trace_key " )).isNull ();
124+ assertThat (rs .getExecutionInfo ().getRequest ().getCustomPayload ().get ("request-id " )).isNull ();
125125 }
126126 }
127127
@@ -139,8 +139,6 @@ public void should_succeed_with_null_value_in_custom_payload() {
139139 SimpleStatement statement =
140140 SimpleStatement .newInstance (query ).setCustomPayload (customPayload );
141141 assertThatStage (session .executeAsync (statement )).isSuccess ();
142- ResultSet rs = session .execute (query );
143- assertThat (rs .getExecutionInfo ().getRequest ().getCustomPayload ().get ("trace_key" )).isNull ();
144142 }
145143 }
146144}
You can’t perform that action at this time.
0 commit comments