Skip to content

Commit

Permalink
šŸ› Fix spring boot smoke test taking a long time, set more sensible deā€¦
Browse files Browse the repository at this point in the history
ā€¦fault for OPA endpoint (#343)

* āœØ set default OPA endpoint to localhost

* āš” set timeoout on waitForTraces
  • Loading branch information
ryandens authored Jul 23, 2021
1 parent 9319d3e commit 306eaa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private HypertraceConfig() {}

static final String DEFAULT_SERVICE_NAME = "unknown";
static final String DEFAULT_REPORTING_ENDPOINT = "http://localhost:4317";
static final String DEFAULT_OPA_ENDPOINT = "http://opa.traceableai:8181/";
static final String DEFAULT_OPA_ENDPOINT = "http://localhost:8181/";
static final int DEFAULT_OPA_POLL_PERIOD_SECONDS = 30;
// 128 KiB
static final int DEFAULT_BODY_MAX_SIZE_BYTES = 128 * 1024;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.opentelemetry.proto.trace.v1.InstrumentationLibrarySpans;
import io.opentelemetry.proto.trace.v1.Span;
import java.io.IOException;
import java.time.Duration;
import java.util.Collection;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
Expand Down Expand Up @@ -162,6 +163,7 @@ protected static Stream<InstrumentationLibrarySpans> getInstrumentationLibSpanSt

protected Collection<ExportTraceServiceRequest> waitForTraces(final int count) {
return Awaitility.await()
.atMost(Duration.ofSeconds(10))
.until(
this::waitForTraces,
exportTraceServiceRequests -> exportTraceServiceRequests.size() == count);
Expand Down

0 comments on commit 306eaa4

Please sign in to comment.