-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Separate distro tests to be per distribution #45565
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
Conversation
The java based distribution tests currently have a single Tests class which encapsulates all of the tests for a particular distribution. The test task in gradle then depends on all distributions being built, and each individual tests class looks for the particular distribution it is trying to test. This means that reproducing a single test failure triggers all the distributions to be built, even though only one is needed for the test. This commit reworks the java distribution tests to pass in a particular distribution to be tested, and changes the base test classes to be actual test classes which have assumptions around which distributions they operate on. For example, the archives tests will be skipped when run with an rpm distribution, and vice versa for the package tests. This makes reproduction much more granular. It also also better splitting up tests around a particular use case. For example, all tests for systemd behavior can be in one test class, and run independently of all tests against rpm/deb distributions.
|
Pinging @elastic/es-core-infra |
| }); | ||
| } catch (Exception e) { | ||
| getLogger().error("Failed command, dumping dmesg", e); | ||
| /*getLogger().error("Failed command, dumping dmesg", e); |
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.
Leftover ? Some more commented code above
alpar-t
left a comment
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.
LGTM, left some minor comments
mark-vieira
left a comment
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.
Minor comments otherwise LGTM. This looks like it will make folks working on packaging tests (ie... you) very happy 😄
buildSrc/src/main/groovy/org/elasticsearch/gradle/test/DistroTestPlugin.java
Show resolved
Hide resolved
buildSrc/src/main/groovy/org/elasticsearch/gradle/test/DistroTestPlugin.java
Show resolved
Hide resolved
buildSrc/src/main/java/org/elasticsearch/gradle/LazyString.java
Outdated
Show resolved
Hide resolved
buildSrc/src/main/java/org/elasticsearch/gradle/LazyString.java
Outdated
Show resolved
Hide resolved
buildSrc/src/main/java/org/elasticsearch/gradle/test/GradleDistroTestTask.java
Outdated
Show resolved
Hide resolved
buildSrc/src/main/java/org/elasticsearch/gradle/vagrant/VagrantMachine.java
Outdated
Show resolved
Hide resolved
|
@mark-vieira I believe I addressed all your feedback. |
|
@elasticmachine run elasticsearch-ci/packaging |
|
Changes LGTM. |
The java based distribution tests currently have a single Tests class which encapsulates all of the tests for a particular distribution. The test task in gradle then depends on all distributions being built, and each individual tests class looks for the particular distribution it is trying to test. This means that reproducing a single test failure triggers all the distributions to be built, even though only one is needed for the test. This commit reworks the java distribution tests to pass in a particular distribution to be tested, and changes the base test classes to be actual test classes which have assumptions around which distributions they operate on. For example, the archives tests will be skipped when run with an rpm distribution, and vice versa for the package tests. This makes reproduction much more granular. It also also better splitting up tests around a particular use case. For example, all tests for systemd behavior can be in one test class, and run independently of all tests against rpm/deb distributions.
The java based distribution tests currently have a single Tests class which encapsulates all of the tests for a particular distribution. The test task in gradle then depends on all distributions being built, and each individual tests class looks for the particular distribution it is trying to test. This means that reproducing a single test failure triggers all the distributions to be built, even though only one is needed for the test. This commit reworks the java distribution tests to pass in a particular distribution to be tested, and changes the base test classes to be actual test classes which have assumptions around which distributions they operate on. For example, the archives tests will be skipped when run with an rpm distribution, and vice versa for the package tests. This makes reproduction much more granular. It also also better splitting up tests around a particular use case. For example, all tests for systemd behavior can be in one test class, and run independently of all tests against rpm/deb distributions.
The java based distribution tests currently have a single Tests class
which encapsulates all of the tests for a particular distribution. The
test task in gradle then depends on all distributions being built, and
each individual tests class looks for the particular distribution it is
trying to test. This means that reproducing a single test failure
triggers all the distributions to be built, even though only one is
needed for the test.
This commit reworks the java distribution tests to pass in a particular
distribution to be tested, and changes the base test classes to be
actual test classes which have assumptions around which distributions
they operate on. For example, the archives tests will be skipped when
run with an rpm distribution, and vice versa for the package tests. This
makes reproduction much more granular. It also also better splitting up
tests around a particular use case. For example, all tests for systemd
behavior can be in one test class, and run independently of all tests
against rpm/deb distributions.