-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
KAFKA-17587 Refactor test infrastructure #18602
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4046919
everything working
mumrah a6cf0ec
move things out of test-common
mumrah d6084ca
remove test-common
mumrah 83f04e6
fix imports. everything compiling again
mumrah 62a2550
rat + spotless
mumrah 4cccb82
fix some errant changes
mumrah e145452
missing import
mumrah 7bedf6f
fix checkstyle
mumrah 9be040a
fix test-common-runtime
mumrah be7d777
add some error handling to junit.py
mumrah 914bb46
Merge branch 'trunk-cached' into KAFKA-17587-test-infra-spi
mumrah 9e00f04
fix extension
mumrah 1143109
fix test
mumrah dc00498
Merge branch 'trunk-cached' into KAFKA-17587-test-infra-spi
mumrah f646c98
Fix log4j runtime dep
mumrah ac5bb0a
rename things
mumrah cf1cede
utilize @Flaky in clients
mumrah 38f6dd7
Merge branch 'trunk-cached' into KAFKA-17587-test-infra-spi
mumrah 25b922a
unused import
mumrah cf638bc
Merge branch 'trunk-cached' into KAFKA-17587-test-infra-spi
mumrah 12696a1
Merge branch 'trunk-cached' into KAFKA-17587-test-infra-spi
mumrah b7d60b7
rename
mumrah 4678853
Merge branch 'trunk-cached' into KAFKA-17587-test-infra-spi
mumrah a117269
Merge remote-tracking branch 'origin/trunk' into KAFKA-17587-test-inf…
mumrah d552f59
fixup ShareConsumerTest
mumrah 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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!DOCTYPE import-control PUBLIC | ||
"-//Puppy Crawl//DTD Import Control 1.1//EN" | ||
"http://www.puppycrawl.com/dtds/import_control_1_1.dtd"> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<import-control pkg="org.apache.kafka"> | ||
<!-- no one depends on the server --> | ||
<disallow pkg="kafka" /> | ||
|
||
<!-- anyone can use public classes --> | ||
<allow pkg="org.apache.kafka.common" exact-match="true" /> | ||
<allow pkg="org.apache.kafka.common.security" /> | ||
<allow pkg="org.apache.kafka.common.serialization" /> | ||
<allow pkg="org.apache.kafka.common.utils" /> | ||
<allow pkg="org.apache.kafka.common.errors" exact-match="true" /> | ||
<allow pkg="org.apache.kafka.common.memory" /> | ||
<allow pkg="org.apache.kafka.common.network" /> | ||
<allow pkg="org.apache.kafka.common.test" /> | ||
|
||
<!-- things from server-common --> | ||
<allow pkg="org.apache.kafka.server.common" /> | ||
|
||
<allow pkg="java" /> | ||
<allow pkg="javax.security" /> | ||
<allow pkg="org.junit" /> | ||
<allow pkg="org.slf4j" /> | ||
|
||
</import-control> |
Oops, something went wrong.
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.
It seems
clients
,core
, andconnect:runtime
need this because they need to importFlaky
. Maybe we can moveFlaky
totest-common:test-common-internal-api
?test-common:test-common-internal-api
can be under java 11 if we moveserver-common
out oftest-common:test-common-internal-api
.test-common:test-common-internal-api
is using enum classes ofserver-common
so they can be replaced by string easily. With that change, we can moveAutoQuarantinedTestFilter
andQuarantinedPostDiscoveryFilter
totest-common:test-common-runtime
to remove thetest-common:test-common-util
alsoThere 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.
Let me see if I understand your proposal
@Flaky
to the "test-common-internal-api"I think this would make sense, except that Java 11 modules like ":clients" cannot bring a runtime dependency with a newer java version. I tried this and got:
Do you know of a way around this?
Since test-common-internal-api is meant to be the abstraction for the test infrastructure offered by test-common-runtime, it doesn't make sense to include one without the other. It might be confusing for developers if
@ClusterTest
was available to import, but was not actually usable.If we want the client integration tests to be moved out of core, we should create a ":clients:integration-tests" module that is Java 17 and move the tests there (similar to what streams does).
I expect "test-common-util" will grow to include helper/common test methods. We can probably combine the most of the various TestUtils into a single Java 11 utils class under this module.
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.
Yes, you're right. Let's keep the current structure.