File tree Expand file tree Collapse file tree
main/java/com/datastax/oss/driver/internal/core/cql
test/java/com/datastax/oss/driver/internal/core/cql Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 */
1616package com .datastax .oss .driver .internal .core .cql ;
1717
18- import com .datastax .oss .driver .api .core .ConsistencyLevel ;
1918import com .datastax .oss .driver .api .core .CqlSession ;
2019import com .datastax .oss .driver .api .core .config .DefaultDriverOption ;
2120import com .datastax .oss .driver .api .core .config .DriverExecutionProfile ;
@@ -56,18 +55,12 @@ class QueryTraceFetcher {
5655 this .tracingId = tracingId ;
5756 this .session = session ;
5857
59- ConsistencyLevel regularConsistency =
60- context
61- .getConsistencyLevelRegistry ()
62- .fromName (config .getString (DefaultDriverOption .REQUEST_CONSISTENCY ));
63- ConsistencyLevel traceConsistency =
64- context
65- .getConsistencyLevelRegistry ()
66- .fromName (config .getString (DefaultDriverOption .REQUEST_TRACE_CONSISTENCY ));
58+ String regularConsistency = config .getString (DefaultDriverOption .REQUEST_CONSISTENCY );
59+ String traceConsistency = config .getString (DefaultDriverOption .REQUEST_TRACE_CONSISTENCY );
6760 this .config =
6861 (traceConsistency .equals (regularConsistency ))
6962 ? config
70- : config .withString (DefaultDriverOption .REQUEST_CONSISTENCY , traceConsistency . name () );
63+ : config .withString (DefaultDriverOption .REQUEST_CONSISTENCY , traceConsistency );
7164
7265 this .maxAttempts = config .getInt (DefaultDriverOption .REQUEST_TRACE_ATTEMPTS );
7366 this .intervalNanos = config .getDuration (DefaultDriverOption .REQUEST_TRACE_INTERVAL ).toNanos ();
Original file line number Diff line number Diff line change 3232import com .datastax .oss .driver .api .core .cql .SimpleStatement ;
3333import com .datastax .oss .driver .api .core .cql .TraceEvent ;
3434import com .datastax .oss .driver .api .core .uuid .Uuids ;
35- import com .datastax .oss .driver .internal .core .DefaultConsistencyLevelRegistry ;
3635import com .datastax .oss .driver .internal .core .context .InternalDriverContext ;
3736import com .datastax .oss .driver .internal .core .context .NettyOptions ;
3837import com .datastax .oss .driver .internal .core .util .concurrent .CompletableFutures ;
@@ -105,9 +104,6 @@ public void setup() {
105104 config .withString (
106105 DefaultDriverOption .REQUEST_CONSISTENCY , DefaultConsistencyLevel .ONE .name ()))
107106 .thenReturn (traceConfig );
108-
109- Mockito .when (context .getConsistencyLevelRegistry ())
110- .thenReturn (new DefaultConsistencyLevelRegistry ());
111107 }
112108
113109 @ Test
You can’t perform that action at this time.
0 commit comments