mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
test: run independent crypto fixtures with bounded concurrency (#7472)
Keep serial defaults and opt independent Cognito and KMS service fixtures into four-worker execution. Preserve per-test state, assertions and real key generation. Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
d481f8396c
commit
a026c8a94c
3 files changed
+14
No files matched your search
@@ -742,6 +742,14 @@
|
||||
<argLine>@{argLine} -Xmx6g</argLine>
|
||||
<systemPropertyVariables>
|
||||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
||||
<!-- Parallel execution is opt-in per class; CPU-heavy service
|
||||
tests with independent fixtures can share four workers. -->
|
||||
<junit.jupiter.execution.parallel.enabled>true</junit.jupiter.execution.parallel.enabled>
|
||||
<junit.jupiter.execution.parallel.mode.default>same_thread</junit.jupiter.execution.parallel.mode.default>
|
||||
<junit.jupiter.execution.parallel.mode.classes.default>same_thread</junit.jupiter.execution.parallel.mode.classes.default>
|
||||
<junit.jupiter.execution.parallel.config.strategy>fixed</junit.jupiter.execution.parallel.config.strategy>
|
||||
<junit.jupiter.execution.parallel.config.fixed.parallelism>4</junit.jupiter.execution.parallel.config.fixed.parallelism>
|
||||
<junit.jupiter.execution.parallel.config.fixed.max-pool-size>4</junit.jupiter.execution.parallel.config.fixed.max-pool-size>
|
||||
<!-- An ARN minted with a blank region fails the test that reached it (BlankRegionGuard). -->
|
||||
<io.github.hectorvent.floci.arn.fail-on-blank-region>true</io.github.hectorvent.floci.arn.fail-on-blank-region>
|
||||
</systemPropertyVariables>
|
||||
|
||||
@@ -32,6 +32,8 @@ import io.github.hectorvent.floci.testing.MutableClock;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.Execution;
|
||||
import org.junit.jupiter.api.parallel.ExecutionMode;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
@@ -76,6 +78,7 @@ import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.ArgumentMatchers.isNull;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@Execution(ExecutionMode.CONCURRENT)
|
||||
class CognitoServiceTest {
|
||||
|
||||
private static final ObjectMapper MAPPER = new ObjectMapper();
|
||||
|
||||
@@ -36,6 +36,8 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.function.Executable;
|
||||
import org.junit.jupiter.api.parallel.Execution;
|
||||
import org.junit.jupiter.api.parallel.ExecutionMode;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
@@ -77,6 +79,7 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@Execution(ExecutionMode.CONCURRENT)
|
||||
class KmsServiceTest {
|
||||
|
||||
private static final String REGION = "us-east-1";
|
||||
|
||||
Reference in new issue
Block a user