-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix e2e acks test #3471
Merged
kkondaka
merged 8 commits into
opensearch-project:main
from
kkondaka:disable-flaky-test
Oct 11, 2023
Merged
Fix e2e acks test #3471
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3045967
Disable flaky e2e acks test
kkondaka 7f1fb70
Disabled another flaky test
kkondaka cba386f
Added debug statements to debug the failing tests
kkondaka 77eda60
Modified to assign unique names to pipelines
kkondaka 93f0913
Trying with enabling the disabled test
kkondaka d86f3b3
Fixed failing checkstyle error
kkondaka ce2f66c
Reduced sleep time in InMemorySource
kkondaka 45c9483
Modified to use log4j
kkondaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,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; | ||
|
@@ -44,13 +45,15 @@ void setUp(String configFile) { | |
.withPipelinesDirectoryOrFile(configFile) | ||
.build(); | ||
|
||
System.out.println("Data Prepper Test with config file "+ configFile + " started at "+Instant.now()); | ||
dataPrepperTestRunner.start(); | ||
inMemorySourceAccessor = dataPrepperTestRunner.getInMemorySourceAccessor(); | ||
inMemorySinkAccessor = dataPrepperTestRunner.getInMemorySinkAccessor(); | ||
} | ||
|
||
@AfterEach | ||
void tearDown() { | ||
System.out.println("Data Prepper Test stopped at "+Instant.now()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, use SLF4J. |
||
dataPrepperTestRunner.stop(); | ||
} | ||
|
||
|
@@ -60,7 +63,7 @@ void simple_pipeline_with_single_record() { | |
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())); | ||
|
@@ -76,7 +79,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())); | ||
|
@@ -91,7 +94,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())); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,7 +115,7 @@ public void run() { | |
try { | ||
final List<Record<Event>> records = inMemorySourceAccessor.read(testingKey); | ||
if (records.size() == 0) { | ||
Thread.sleep(1000); | ||
Thread.sleep(50); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! |
||
continue; | ||
} | ||
AcknowledgementSet ackSet = | ||
|
2 changes: 1 addition & 1 deletion
2
...es/org/opensearch/dataprepper/pipeline/acknowledgements/one-pipeline-ack-expiry-test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pipeline1: | ||
pipeline-expiry-test: | ||
delay: 2 | ||
source: | ||
in_memory: | ||
|
2 changes: 1 addition & 1 deletion
2
...ources/org/opensearch/dataprepper/pipeline/acknowledgements/one-pipeline-three-sinks.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pipeline1: | ||
pipeline-three-sinks-test: | ||
delay: 2 | ||
source: | ||
in_memory: | ||
|
2 changes: 1 addition & 1 deletion
2
...ationTest/resources/org/opensearch/dataprepper/pipeline/acknowledgements/simple-test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
simple-pipeline: | ||
simple-pipeline-test: | ||
delay: 10 | ||
source: | ||
in_memory: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
.../resources/org/opensearch/dataprepper/pipeline/acknowledgements/three-pipelines-test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...ces/org/opensearch/dataprepper/pipeline/acknowledgements/two-parallel-pipelines-test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...st/resources/org/opensearch/dataprepper/pipeline/acknowledgements/two-pipelines-test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this to an SLF4J log line.