From 98873167ef9d2f3b29bf47ff9bc9c9ccbede98f1 Mon Sep 17 00:00:00 2001 From: Trevor Pering Date: Thu, 8 Dec 2022 22:20:48 -0800 Subject: [PATCH] Cleanup --- .github/workflows/testing.yml | 2 +- .../java/com/google/daq/mqtt/sequencer/SequenceBase.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b059ae02f..1dda422a6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,7 +4,7 @@ on: push: pull_request: schedule: - - cron: '40 * * * *' + - cron: '0 13 * * *' jobs: unit: 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 75872de28..c8b38a5e0 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 @@ -113,6 +113,7 @@ public class SequenceBase { private static final String SYSTEM_LOG = "system.log"; private static final String SEQUENCE_MD = "sequence.md"; private static final long CLEAN_START_DELAY_MS = 20 * 1000; + private static final String WAITING_FOR_GODOT = "nothing"; protected static Metadata deviceMetadata; protected static String projectId; protected static String cloudRegion; @@ -403,9 +404,10 @@ public void valid_serial_no() { } private void recordResult(String result, String methodName, String message) { - notice(String.format(RESULT_FORMAT, result, methodName, message)); + String resultString = String.format(RESULT_FORMAT, result, methodName, message); + notice(resultString); try (PrintWriter log = new PrintWriter(new FileOutputStream(resultSummary, true))) { - log.printf(RESULT_FORMAT, result, methodName, message); + log.print(resultString); } catch (Exception e) { throw new RuntimeException("While writing report summary " + resultSummary.getAbsolutePath(), e); @@ -738,7 +740,7 @@ private void messageEvaluateLoop(Supplier evaluator) { processMessage(); } info(String.format("finished %s after %s", waitingCondition, timeSinceStart())); - waitingCondition = "nothing"; + waitingCondition = WAITING_FOR_GODOT; } private void recordSequence(String step) {