From b00264d35b4360a5b07ad02c5349a9d047c53317 Mon Sep 17 00:00:00 2001 From: Trevor Date: Thu, 19 Dec 2024 18:06:25 -0800 Subject: [PATCH] fix broken_config flaky test (#1055) --- .../java/com/google/daq/mqtt/sequencer/SequenceBase.java | 5 +++-- .../google/daq/mqtt/sequencer/sequences/ConfigSequences.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/validator/src/main/java/com/google/daq/mqtt/sequencer/SequenceBase.java b/validator/src/main/java/com/google/daq/mqtt/sequencer/SequenceBase.java index ac33c1de4d..7ca7dac671 100644 --- a/validator/src/main/java/com/google/daq/mqtt/sequencer/SequenceBase.java +++ b/validator/src/main/java/com/google/daq/mqtt/sequencer/SequenceBase.java @@ -263,6 +263,7 @@ public class SequenceBase { private static final String NOT_REPLACEMENT = " not "; private static final String NOT_MISSING = " "; private static final Duration STATE_CONFIG_HOLDOFF = Duration.ofMillis(1000); + public static final String ELAPSED_TIME_PREFIX = "@"; protected static Metadata deviceMetadata; protected static String projectId; protected static String cloudRegion; @@ -1776,7 +1777,7 @@ private long waitTimeRemainingSec() { } private String timeSinceStart() { - return (System.currentTimeMillis() - startTestTimeMs) / 1000 + "s"; + return ELAPSED_TIME_PREFIX + (System.currentTimeMillis() - startTestTimeMs) / 1000 + "s"; } protected void untilTrue(String description, Supplier evaluator) { @@ -2757,7 +2758,7 @@ protected void failed(Throwable e, Description description) { if (debugLogLevel()) { processComplete(e); trace("Stack trace:", stackTraceString(e)); - error("terminating test " + testName + " after " + timeSinceStart() + " " + error("terminating test " + testName + " at " + timeSinceStart() + " " + START_END_MARKER); System.exit(EXIT_CODE_PRESERVE); } diff --git a/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java b/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java index ada51e97ff..50aa704921 100644 --- a/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java +++ b/validator/src/main/java/com/google/daq/mqtt/sequencer/sequences/ConfigSequences.java @@ -123,7 +123,7 @@ public void device_config_acked() { }); } - @Test(timeout = TWO_MINUTES_MS) + @Test(timeout = THREE_MINUTES_MS) @Feature(stage = STABLE, bucket = SYSTEM, score = 8) @WithCapability(value = Status.class, stage = ALPHA) @WithCapability(value = Logging.class, stage = ALPHA)