Skip to content

Commit

Permalink
WIP: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoneGiusso committed Nov 16, 2022
1 parent 0ca0549 commit 8841346
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ muzzle {
pass {
group.set("com.datastax.oss")
module.set("java-driver-core")
versions.set("[4.14,)")
assertInverse.set(true)
versions.set("[4.4,]")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import com.datastax.oss.driver.api.core.cql.ExecutionInfo;
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.opentelemetry.javaagent.bootstrap.internal.CommonConfig;
import io.opentelemetry.javaagent.instrumentation.cassandra.v4_0.CassandraRequest;
import io.opentelemetry.javaagent.instrumentation.cassandra.v4_0.CassandraTelemetry;
import io.opentelemetry.javaagent.bootstrap.internal.CommonConfig;

final class CassandraSingletons {
// using ExecutionInfo because we can get that from ResultSet, AsyncResultSet and DriverException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.datastax.oss.driver.api.core.CqlSession;
import java.util.function.Function;

class CompletionStageFunction implements Function<Object, Object> {
public class CompletionStageFunction implements Function<Object, Object> {

@Override
public Object apply(Object session) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@
public class TracingCqlSession
extends io.opentelemetry.javaagent.instrumentation.cassandra.v4_0.TracingCqlSession {

private final CqlSession tracingSession;

public TracingCqlSession(
CqlSession session, Instrumenter<CassandraRequest, ExecutionInfo> instrumenter) {
super(session, instrumenter);
tracingSession = session;
}

@Override
public ReactiveResultSet executeReactive(Statement<?> statement) {
return new DefaultReactiveResultSet(() -> executeAsync(statement));
return new DefaultReactiveResultSet(() -> tracingSession.executeAsync(statement));
}
}

0 comments on commit 8841346

Please sign in to comment.