kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Roesler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-6474) Rewrite test to use new public TopologyTestDriver
Date Thu, 22 Mar 2018 19:27:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-6474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16410162#comment-16410162
] 

John Roesler commented on KAFKA-6474:
-------------------------------------

Yeah, thanks [~h314to]! I had tried it with just half of that change, and it obviously didn't
work. I'm really glad you figured that out!

FYI, there are other sub-projects in kafka that are going to follow this pattern, so I'm going
to start a dev mailing list discussion to share your pattern.

Also, for completeness, I had to augment your build.gradle patch slightly to get './gradlew
streams:test-utils:test' to pass:
{noformat}
diff --git a/build.gradle b/build.gradle
index 5e4c35643..2f38bf28b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -921,6 +921,7 @@ project(':streams') {
testCompile project(':clients').sourceSets.test.output
testCompile project(':core')
testCompile project(':core').sourceSets.test.output
+ testCompile project(':streams:test-utils').sourceSets.main.output
testCompile libs.junit
testCompile libs.easymock
testCompile libs.bcpkix
@@ -965,11 +966,12 @@ project(':streams:test-utils') {
archivesBaseName = "kafka-streams-test-utils"

dependencies {
- compile project(':streams')
+ compile project(':streams').sourceSets.main.output
compile project(':clients')

testCompile project(':clients').sourceSets.test.output
testCompile libs.junit
+ testCompile libs.rocksDBJni

testRuntime libs.slf4jlog4j
}{noformat}
The reason is that we are skippingĀ :streams:copyDependantLibs during test-utils:compile now
(to avoid the circular dependency), so we have to explictly depend in testCompile on any libs
that would have been transitively pulled in from :streams (and are in the test's run-time
code path).

In case you run into a similar error when you run the full test suite, the error I saw was:
{noformat}
java.lang.ClassNotFoundException: org.rocksdb.RocksDBException{noformat}

> Rewrite test to use new public TopologyTestDriver
> -------------------------------------------------
>
>                 Key: KAFKA-6474
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6474
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams, unit tests
>    Affects Versions: 1.1.0
>            Reporter: Matthias J. Sax
>            Assignee: Filipe Agapito
>            Priority: Major
>              Labels: beginner, newbie
>
> With KIP-247 we added public TopologyTestDriver. We should rewrite out own test to use
this new test driver and remove the two classes ProcessorTopoogyTestDriver and KStreamTestDriver.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message