Skip to content

Commit

Permalink
Added debug statements to debug the failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Kondaka <[email protected]>
  • Loading branch information
kkondaka committed Oct 10, 2023
1 parent 7f1fb70 commit cba386f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.List;
import java.util.concurrent.TimeUnit;
import java.time.Instant;

import static org.awaitility.Awaitility.await;
import static org.hamcrest.CoreMatchers.equalTo;
Expand Down Expand Up @@ -46,23 +47,24 @@ void setUp(String configFile) {
.build();

dataPrepperTestRunner.start();
System.out.println("Data Prepper Test started at "+Instant.now());
inMemorySourceAccessor = dataPrepperTestRunner.getInMemorySourceAccessor();
inMemorySinkAccessor = dataPrepperTestRunner.getInMemorySinkAccessor();
}

@AfterEach
void tearDown() {
System.out.println("Data Prepper Test stopped at "+Instant.now());
dataPrepperTestRunner.stop();
}

@Test
@Disabled("Disabling because this test is flaky.")
void simple_pipeline_with_single_record() {
setUp(SIMPLE_PIPELINE_CONFIGURATION_UNDER_TEST);
final int numRecords = 1;
inMemorySourceAccessor.submit(IN_MEMORY_IDENTIFIER, numRecords);

await().atMost(2000, TimeUnit.MILLISECONDS)
await().atMost(20000, TimeUnit.MILLISECONDS)
.untilAsserted(() -> {
List<Record<Event>> outputRecords = inMemorySinkAccessor.get(IN_MEMORY_IDENTIFIER);
assertThat(outputRecords, not(empty()));
Expand All @@ -78,7 +80,7 @@ void simple_pipeline_with_multiple_records() {
final int numRecords = 100;
inMemorySourceAccessor.submit(IN_MEMORY_IDENTIFIER, numRecords);

await().atMost(2000, TimeUnit.MILLISECONDS)
await().atMost(20000, TimeUnit.MILLISECONDS)
.untilAsserted(() -> {
List<Record<Event>> outputRecords = inMemorySinkAccessor.get(IN_MEMORY_IDENTIFIER);
assertThat(outputRecords, not(empty()));
Expand All @@ -93,7 +95,7 @@ void two_pipelines_with_multiple_records() {
final int numRecords = 100;
inMemorySourceAccessor.submit(IN_MEMORY_IDENTIFIER, numRecords);

await().atMost(5000, TimeUnit.MILLISECONDS)
await().atMost(20000, TimeUnit.MILLISECONDS)
.untilAsserted(() -> {
List<Record<Event>> outputRecords = inMemorySinkAccessor.get(IN_MEMORY_IDENTIFIER);
assertThat(outputRecords, not(empty()));
Expand Down

0 comments on commit cba386f

Please sign in to comment.