Skip to content

Conversation

@scosenza
Copy link
Contributor

@scosenza scosenza commented May 8, 2016

Build a test-jar of flink-connector-kafka-0.9 so that Flink users can use KafkaTestEnvironmentImpl to write end to end integration tests of their Flink jobs.

Build a test-jar including KafkaTestEnvironmentImpl so that Flink users can write end to end integration tests of their Flink jobs.
@scosenza
Copy link
Contributor Author

scosenza commented May 8, 2016

/cc @jgrier

@rmetzger
Copy link
Contributor

Hi,
thank you for opening a pull request about this. I think the change is good to merge. One thing I'm wondering is: why do you only include on class (or a set of classes with a shared prefix) into the test-jar?
I would put all test classes into the test-jar (we never know what users will need in the future)

@scosenza
Copy link
Contributor Author

Hi Robert,

Typically, a test-jar would not contain JUnit test classes unless they are designed to be extended. On a related note, it's also good to avoid including logback-test.xml inside your test-jars, as this leads to the following warning when others (who are also using logback) depend on your test-jar.

16:01:09,771 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/Users/.../target/test-classes/logback-test.xml]
16:01:09,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs multiple times on the classpath.
16:01:09,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs at [jar:file:/Users/scosenza/.m2/repository/org/apache/flink/flink-connector-kafka-base_2.11/1.0.2/flink-connector-kafka-base_2.11-1.0.2-tests.jar!/logback-test.xml]
16:01:09,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs at [jar:file:/Users/scosenza/.m2/repository/org/apache/flink/flink-core/1.0.2/flink-core-1.0.2-tests.jar!/logback-test.xml]
16:01:09,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs at [file:/Users/scosenza/.../target/test-classes/logback-test.xml]
16:01:09,772 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback-test.xml] occurs at [jar:file:/Users/scosenza/.m2/repository/org/apache/flink/flink-runtime_2.11/1.0.2/flink-runtime_2.11-1.0.2-tests.jar!/logback-test.xml]

@StephanEwen
Copy link
Contributor

I think this is good, will merge this...

@asfgit asfgit closed this in 1e9fff4 May 17, 2016
mbode pushed a commit to mbode/flink that referenced this pull request May 27, 2016
Build a test-jar including KafkaTestEnvironmentImpl so that Flink users can write end to end integration tests of their Flink jobs.

This closes apache#1972
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.

3 participants