Enable kafka sink integration tests as a github workflow action#6751
Conversation
39252de to
3affe7d
Compare
Signed-off-by: Taylor Gray <tylgry@amazon.com>
3affe7d to
91dcd7e
Compare
Signed-off-by: Taylor Gray <tylgry@amazon.com>
Signed-off-by: Taylor Gray <tylgry@amazon.com>
| import static org.mockito.Mockito.when; | ||
|
|
||
|
|
||
| /** |
There was a problem hiding this comment.
I don't think we need this comment.
There was a problem hiding this comment.
I added this comment to force the tests to run as github action since it only runs when a change is detected. Is there a manual way to run a github action?
| if (!records.isEmpty() && records.count() > 0) { | ||
| List<JsonNode> consumed = new ArrayList<>(); | ||
| int maxRetries = 15; | ||
| while (consumed.size() < expectedRecords.size() && maxRetries-- > 0) { |
There was a problem hiding this comment.
Can we use Awaitility instead?
| topicConfig = mock(TopicProducerConfig.class); | ||
| when(topicConfig.getName()).thenReturn(testTopic); | ||
| when(topicConfig.getSerdeFormat()).thenReturn(MessageFormat.JSON); | ||
| when(topicConfig.isCreateTopic()).thenReturn(false); |
There was a problem hiding this comment.
I think we will need this for the GitHub Actions to pass. Unless there is some code in this test that creates the topic.
There was a problem hiding this comment.
The topic is created in the test code separately, so the sink plugin does not create the topic, just the test.
| created.set(false); | ||
| } | ||
| while (created.get() != false) { | ||
| while (!created.get()) { |
There was a problem hiding this comment.
Use Awaitility. Also this has not stopping point during failures.
Signed-off-by: Taylor Gray <tylgry@amazon.com>
Description
Enabled kafka sink integration tests as a github workflow action
Locally ran kafka source and sink integration tests to confirm they are passing. The github actions for this PR still fail due to the old integ test code running for kafka source
Issues Resolved
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.