From b1b4ce15fd214a7ec6abd7dc60e1ab967f1e920d Mon Sep 17 00:00:00 2001 From: Ivan Bodrov Date: Thu, 7 Nov 2024 16:35:12 -0500 Subject: [PATCH 1/2] it: make extension instances static --- .../java/com/walmartlabs/concord/it/runtime/v2/CryptoIT.java | 2 +- .../java/com/walmartlabs/concord/it/runtime/v2/FormIT.java | 2 +- .../com/walmartlabs/concord/it/runtime/v2/ImportsIT.java | 2 +- .../com/walmartlabs/concord/it/runtime/v2/JsonStoreIT.java | 2 +- .../java/com/walmartlabs/concord/it/runtime/v2/KvTaskIT.java | 2 +- .../com/walmartlabs/concord/it/runtime/v2/NodeRosterIT.java | 2 +- .../java/com/walmartlabs/concord/it/runtime/v2/SmtpIT.java | 5 +++-- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/CryptoIT.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/CryptoIT.java index cc138f5678..54866dc8f2 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/CryptoIT.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/CryptoIT.java @@ -36,7 +36,7 @@ public class CryptoIT extends AbstractTest { @RegisterExtension - public final ConcordRule concord = ConcordConfiguration.configure(); + public static final ConcordRule concord = ConcordConfiguration.configure(); /** * Tests various methods of the 'crypto' plugin. diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/FormIT.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/FormIT.java index f652db0411..f22d1ec1cd 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/FormIT.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/FormIT.java @@ -49,7 +49,7 @@ public class FormIT extends AbstractTest { @RegisterExtension - public final ConcordRule concord = ConcordConfiguration.configure(); + public static final ConcordRule concord = ConcordConfiguration.configure(); /** * A straightforward single form process. diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ImportsIT.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ImportsIT.java index c59cc3289d..0ac2c3e19b 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ImportsIT.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ImportsIT.java @@ -40,7 +40,7 @@ public class ImportsIT extends AbstractTest { @RegisterExtension - public final ConcordRule concord = ConcordConfiguration.configure() + public static final ConcordRule concord = ConcordConfiguration.configure() .extraConfigurationSupplier(() -> "concord-server { imports { disabledProcessors = [] } }\n" + "concord-agent { imports { disabledProcessors = [] } }"); diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/JsonStoreIT.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/JsonStoreIT.java index 4143599edf..078f54f690 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/JsonStoreIT.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/JsonStoreIT.java @@ -35,7 +35,7 @@ public class JsonStoreIT extends AbstractTest { @RegisterExtension - public final ConcordRule concord = ConcordConfiguration.configure(); + public static final ConcordRule concord = ConcordConfiguration.configure(); /** * Tests various methods of the 'jsonStore' plugin. diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/KvTaskIT.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/KvTaskIT.java index 0798ceb330..aab8d0717a 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/KvTaskIT.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/KvTaskIT.java @@ -32,7 +32,7 @@ public class KvTaskIT extends AbstractTest { @RegisterExtension - public final ConcordRule concord = ConcordConfiguration.configure(); + public static final ConcordRule concord = ConcordConfiguration.configure(); /** * Tests various methods of the 'kv' plugin. diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/NodeRosterIT.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/NodeRosterIT.java index fd72198018..f41bb1e133 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/NodeRosterIT.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/NodeRosterIT.java @@ -36,7 +36,7 @@ public class NodeRosterIT extends AbstractTest { @RegisterExtension - public final ConcordRule concord = ConcordConfiguration.configure(); + public static final ConcordRule concord = ConcordConfiguration.configure(); /** * Tests various methods of the 'noderoster' plugin. diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/SmtpIT.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/SmtpIT.java index 453d05f349..2e74d2d1a5 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/SmtpIT.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/SmtpIT.java @@ -40,10 +40,11 @@ public class SmtpIT extends AbstractTest { @RegisterExtension - GreenMailExtension mailServer = new GreenMailExtension(new ServerSetup(0, "0.0.0.0", ServerSetup.PROTOCOL_SMTP)); + public static final GreenMailExtension mailServer = new GreenMailExtension(new ServerSetup(0, "0.0.0.0", ServerSetup.PROTOCOL_SMTP)) + .withPerMethodLifecycle(false); @RegisterExtension - public final ConcordRule concord = ConcordConfiguration.configure() + public static final ConcordRule concord = ConcordConfiguration.configure() .containerListener(new ContainerListener() { @Override public void beforeStart(ContainerType type) { From 617c49eb393e9ec5737bd2e75f785baf65abe573 Mon Sep 17 00:00:00 2001 From: Ivan Bodrov Date: Tue, 12 Nov 2024 09:40:52 -0500 Subject: [PATCH 2/2] it: tighten up polling intervals --- .../concord/it/runtime/v2/ConcordConfiguration.java | 11 ++++++++++- it/server/src/test/resources/agent.conf | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ConcordConfiguration.java b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ConcordConfiguration.java index ee76fa2f16..f986a90e23 100644 --- a/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ConcordConfiguration.java +++ b/it/runtime-v2/src/test/java/com/walmartlabs/concord/it/runtime/v2/ConcordConfiguration.java @@ -58,7 +58,16 @@ public static ConcordRule configure() { .streamAgentLogs(true) .sharedContainerDir(sharedDir) .useLocalMavenRepository(true) - .extraConfigurationSupplier(() -> "concord-agent { prefork { enabled = true } }"); + .extraConfigurationSupplier(() -> """ + concord-agent { + dependencyResolveTimeout = "5 seconds" + logMaxDelay = "250 milliseconds" + pollInterval = "250 milliseconds" + prefork { + enabled = true + } + } + """); boolean localMode = Boolean.parseBoolean(System.getProperty("it.local.mode")); if (localMode) { diff --git a/it/server/src/test/resources/agent.conf b/it/server/src/test/resources/agent.conf index 3cda4cca14..a3eee4c129 100644 --- a/it/server/src/test/resources/agent.conf +++ b/it/server/src/test/resources/agent.conf @@ -1,5 +1,9 @@ concord-agent { + dependencyResolveTimeout = "5 seconds" + logMaxDelay = "250 milliseconds" + pollInterval = "250 milliseconds" + prefork { enabled = true }