Skip to content

MINOR: Added more integration tests#1285

Closed
enothereska wants to merge 5 commits into
apache:trunkfrom
enothereska:more-integration-tests
Closed

MINOR: Added more integration tests#1285
enothereska wants to merge 5 commits into
apache:trunkfrom
enothereska:more-integration-tests

Conversation

@enothereska
Copy link
Copy Markdown
Contributor

No description provided.

@enothereska
Copy link
Copy Markdown
Contributor Author

@miguno could you have an initial look?

Comment thread build.gradle Outdated
testCompile project(':core')
testCompile project(':core').sourceSets.test.output
testCompile libs.junit
testCompile libs.assertj
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this to use assertThat notation, hamcrest is included by default in JUnit and we can just use that?

Copy link
Copy Markdown
Contributor Author

@enothereska enothereska Apr 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijuma the hamcrest included with junit unfortunately doesn't have the "contains" Matcher included, but I'll use another matcher. Thanks.

IntegrationTestUtils.produceValuesSynchronously(INPUT_TOPIC_A, inputValues, producerConfig);

// Give the stream processing application some time to do its work.
Thread.sleep(10000);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now I think we should keep the (high) sleep times as is.

But in general we may want to lower the sleep times in this PR. I don't know what a "good" value would be (preferably we'd be able to use TestUtils.waitUntilTrue eventually) -- using sleep just s*cks -- but I think Jenkins should be running a bit faster than Travis. Perhaps we should give it a try with 5s rather than 10s?

That said, we perhaps don't want another iteration on this code, given that the 0.10 vote already started.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miguno I tried 5s instead but it didn't always work.

@miguno
Copy link
Copy Markdown
Contributor

miguno commented May 3, 2016

LGTM.

@guozhangwang : Could you take a look, too, please?

@guozhangwang
Copy link
Copy Markdown
Contributor

LGTM overall. I'm indeed concerned about the time taken for these tests, as we are addung about one minute into the unit test suite.

A couple of things we can do as follow-ups: 1) once #1264 is merged, we can use a mock producer / consumer in Kafka Streams and check directly in the mock producers to check if the expected data was sent, and remove the embedded kafka cluster.

  1. With the mock producer we can also use waitUntil to wait for the expected number of records to be sent, and hence get rid of the sleeping.

@enothereska
Copy link
Copy Markdown
Contributor Author

@guozhangwang I reduced the sleep time quite a bit. Will follow up once other PRs are in. Thanks.

@guozhangwang
Copy link
Copy Markdown
Contributor

LGTM. Merged to trunk.

@asfgit asfgit closed this in b3d2c0d May 3, 2016
@enothereska enothereska deleted the more-integration-tests branch May 3, 2016 20:32
asfgit pushed a commit that referenced this pull request May 4, 2016
Author: Eno Thereska <eno.thereska@gmail.com>

Reviewers: Ismael Juma, Michael G. Noll, Guozhang Wang

Closes #1285 from enothereska/more-integration-tests
gfodor pushed a commit to AltspaceVR/kafka that referenced this pull request Jun 3, 2016
Author: Eno Thereska <eno.thereska@gmail.com>

Reviewers: Ismael Juma, Michael G. Noll, Guozhang Wang

Closes apache#1285 from enothereska/more-integration-tests
mumrah pushed a commit to mumrah/kafka that referenced this pull request Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants