Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ public void start() {
}

public void stop() {
lowRateFlush(this);
snapshotSink.highRateFlush(null);
cancelSchedule(this.flushIntervalScheduled);
cancelSchedule(this.lowRateScheduled);
lowRateFlush(this);
snapshotSink.highRateFlush(null);
probeStatusSink.stop();
symbolSink.stop();
snapshotSink.stop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ private List<String> getSerializedSnapshots(BlockingQueue<Snapshot> queue, int l
if (!largeBatch) {
LOGGER.debug("Sending snapshot for probe: {}", snapshot.getProbe().getId());
}
} catch (AssertionError e) {
// Re-queue on AssertionError from Moshi when thread is interrupted so the shutdown hook
// flush can retry with a non-interrupted thread
ExceptionHelper.logException(LOGGER, e, "Error during snapshot serialization:");
queue.offer(snapshot);
} catch (Exception e) {
ExceptionHelper.logException(LOGGER, e, "Error during snapshot serialization:");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class MockBackend implements AutoCloseable {
}

List<Map<String, Object>> waitForLogs(int expectedCount) {
def traceReceiveConditions = new PollingConditions(timeout: 15, initialDelay: 1, delay: 0.5, factor: 1)
def traceReceiveConditions = new PollingConditions(timeout: 30, initialDelay: 1, delay: 0.5, factor: 1)
traceReceiveConditions.eventually {
assert receivedLogs.size() == expectedCount
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package datadog.smoketest


import datadog.trace.api.config.CiVisibilityConfig
import datadog.trace.api.config.DebuggerConfig
import datadog.trace.api.config.GeneralConfig
import datadog.trace.civisibility.CiVisibilitySmokeTest
import java.nio.file.FileVisitResult
Expand Down Expand Up @@ -52,7 +53,8 @@ class JUnitConsoleSmokeTest extends CiVisibilitySmokeTest {

def exitCode = whenRunningJUnitConsole([
(CiVisibilityConfig.CIVISIBILITY_FLAKY_RETRY_COUNT): "3",
(GeneralConfig.AGENTLESS_LOG_SUBMISSION_URL): mockBackend.intakeUrl
(GeneralConfig.AGENTLESS_LOG_SUBMISSION_URL): mockBackend.intakeUrl,
(DebuggerConfig.DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL): "999999" // avoid possible race conditions on shutdown
],
[:])
assert exitCode == 1
Expand Down