Skip to content

Commit

Permalink
Merge pull request #509 from AndreKurait/SlowTestFixup
Browse files Browse the repository at this point in the history
Slow test fixup
  • Loading branch information
AndreKurait authored Feb 16, 2024
2 parents 18e2a95 + c253aa8 commit 7dac332
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TrafficCapture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ allprojects {
}

task slowTest(type: Test) {
useJUnitPlatform {
// SlowTests currently use additional resource overhead, so halving core based parallelism
systemProperty 'junit.jupiter.execution.parallel.config.strategy', 'dynamic'
systemProperty 'junit.jupiter.execution.parallel.config.dynamic.factor', '0.5'
}
systemProperty 'disableMemoryLeakTests', 'false'
jacoco {
enabled = true
Expand Down Expand Up @@ -85,3 +90,4 @@ jacocoTestReport {
html.destination file("${buildDir}/reports/jacoco/test/html")
}
}

Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package org.opensearch.migrations.trafficcapture.proxyserver.testcontainers.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.parallel.ResourceLock;

@Inherited
@ResourceLock("HttpdContainer")
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@TestContainerTest
public @interface HttpdContainerTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package org.opensearch.migrations.trafficcapture.proxyserver.testcontainers.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.parallel.ResourceLock;

@Inherited
@ResourceLock("KafkaContainer")
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@TestContainerTest
public @interface KafkaContainerTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package org.opensearch.migrations.trafficcapture.proxyserver.testcontainers.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.Tag;
import org.testcontainers.junit.jupiter.Testcontainers;

@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Tag("longTest")
@Testcontainers(disabledWithoutDocker = true, parallel = true)
public @interface TestContainerTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package org.opensearch.migrations.trafficcapture.proxyserver.testcontainers.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.parallel.ResourceLock;

@Inherited
@ResourceLock("ToxiproxyContainerTestBase")
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@TestContainerTest
public @interface ToxiproxyContainerTest {
}

0 comments on commit 7dac332

Please sign in to comment.