From 306eaa4723cd9d719edb53523a1a0695654c7b4b Mon Sep 17 00:00:00 2001 From: Ryan Dens Date: Fri, 23 Jul 2021 15:00:39 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20spring=20boot=20smoke=20te?= =?UTF-8?q?st=20taking=20a=20long=20time,=20set=20more=20sensible=20defaul?= =?UTF-8?q?t=20for=20OPA=20endpoint=20=20(#343)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :sparkles: set default OPA endpoint to localhost * :zap: set timeoout on waitForTraces --- .../agent/otel/extensions/config/HypertraceConfig.java | 2 +- .../java/org/hypertrace/agent/smoketest/AbstractSmokeTest.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/config/HypertraceConfig.java b/otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/config/HypertraceConfig.java index 2ffc11d0a..c092a5aa2 100644 --- a/otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/config/HypertraceConfig.java +++ b/otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/config/HypertraceConfig.java @@ -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; diff --git a/smoke-tests/src/test/java/org/hypertrace/agent/smoketest/AbstractSmokeTest.java b/smoke-tests/src/test/java/org/hypertrace/agent/smoketest/AbstractSmokeTest.java index 803b23630..124896d65 100644 --- a/smoke-tests/src/test/java/org/hypertrace/agent/smoketest/AbstractSmokeTest.java +++ b/smoke-tests/src/test/java/org/hypertrace/agent/smoketest/AbstractSmokeTest.java @@ -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; @@ -162,6 +163,7 @@ protected static Stream getInstrumentationLibSpanSt protected Collection waitForTraces(final int count) { return Awaitility.await() + .atMost(Duration.ofSeconds(10)) .until( this::waitForTraces, exportTraceServiceRequests -> exportTraceServiceRequests.size() == count);