-
Notifications
You must be signed in to change notification settings - Fork 25.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
TEST: Fix test task invocation #31657
TEST: Fix test task invocation #31657
Conversation
Pinging @elastic/es-core-infra |
client/benchmark/build.gradle
Outdated
@@ -47,8 +47,7 @@ mainClassName = 'org.elasticsearch.client.benchmark.BenchmarkMain' | |||
|
|||
// never try to invoke tests on the benchmark project - there aren't any | |||
check.dependsOn.remove(test) |
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.
Sorry for missing this.
I handled a similar case in RandomizedTestingPlugin.replaceTestTask
, note that the line above that removes it from check doesn't work reliably either. I think you might be better off with test.enabled = false
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.
@atorok np, let me try that. Seems my approach doesn't work after all. It fixes test
but some naming check fails now (likely because the replacement didn't actually happen now).
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.
Isn't that the same naming test that's going on in CI ?
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.
@atorok ci failed with:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+pull-request/12497/console
16:07:37 Starting process 'Gradle Test Executor 2'. Working directory: /var/lib/jenkins/workspace/elastic+elasticsearch+pull-request/distribution/bwc/next-minor-snapshot/build/bwc/checkout-6.x/buildSrc Command: /var/lib/jenkins/.java/oracle-10+46-linux/bin/java -Dorg.gradle.native=false @/tmp/gradle-worker-classpath1600404273191648248txt -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 2'
16:07:37 Successfully started process 'Gradle Test Executor 2'
16:07:51
16:07:51 org.elasticsearch.gradle.precommit.NamingConventionsTaskIT > testNameCheckFailsAsItShouldWithMain FAILED
16:07:51 java.lang.AssertionError: expected: 'Classes ending with [Tests] or [IT] or extending [UnitTestCase] must be in src/test/java:' but it was not found in the output
16:07:51 at __randomizedtesting.SeedInfo.seed([932913760A8CAE23:BE1DB584958467F5]:0)
16:07:51 at org.junit.Assert.fail(Assert.java:88)
16:07:51 at org.junit.Assert.assertTrue(Assert.java:41)
16:07:51 at org.elasticsearch.gradle.precommit.NamingConventionsTaskIT.testNameCheckFailsAsItShouldWithMain(NamingConventionsTaskIT.java:65)
16:07:56
16:07:56 org.elasticsearch.gradle.precommit.NamingConventionsTaskIT > testNameCheckFailsAsItShould FAILED
16:07:56 java.lang.AssertionError: expected: 'Found inner classes that are tests, which are excluded from the test runner:' but it was not found in the output
16:07:56 at __randomizedtesting.SeedInfo.seed([932913760A8CAE23:BD0BAE6730164B25]:0)
16:07:56 at org.junit.Assert.fail(Assert.java:88)
16:07:56 at org.junit.Assert.assertTrue(Assert.java:41)
16:07:56 at org.elasticsearch.gradle.precommit.NamingConventionsTaskIT.testNameCheckFailsAsItShould(NamingConventionsTaskIT.java:40)
16:07:56 WARNING: An illegal reflective access operation has occurred
16:07:56 WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/var/lib/jenkins/.gradle/wrapper/dists/gradle-4.8.1-all/6fmj4nezasjg1b7kkmy10xgo2/gradle-4.8.1/lib/groovy-all-2.4.12.jar) to method java.lang.Object.finalize()
16:07:56 WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
16:07:56 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
16:07:56 WARNING: All illegal access operations will be denied in a future release
16:07:56
16:07:56 Gradle Test Executor 2 finished executing tests.
16:07:56
16:07:56
16:07:56 14 tests completed, 2 failed
16:07:56
16:07:56 > Task :buildSrc:test FAILED
16:07:56 FAILURE: Build failed with an exception.
16:07:56
on check
when I just removed the test
target. I now tried test.enabled=false
(that def. fixed test
locally for me, but not sure if it also fixes check
)
74d556d
to
0eb7930
Compare
LGTM. It will fix |
@atorok still breaks the same way unfortunately :( If I run the broken target in isolation it's green with this change, but
yea I found gradle/gradle#5730. I'll try to look into this a little, but you probably know a lot more than me here :) |
Same failure here for master https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+default-distro-bwc-tests/124/console in the bwc tests and distributing tests: |
0eb7930
to
50dad7b
Compare
@atorok now it's green since the failing tests were muted in |
Yes, it's good to go, I think that test never played a role with this change other than preventing testing it. |
@atorok ok thanks! |
* master: Do not check for object existence when deleting repository index files (#31680) Remove extra check for object existence in repository-gcs read object (#31661) Support multiple system store types (#31650) [Test] Clean up some repository-s3 tests (#31601) [Docs] Use capital letters in section headings (#31678) [DOCS] Add PQL language Plugin (#31237) Merge AzureStorageService and AzureStorageServiceImpl and clean up tests (#31607) TEST: Fix test task invocation (#31657) Revert "[TEST] Mute failing tests in NativeRealmInteg and ReservedRealmInteg" Fix RealmInteg test failures Extend allowed characters for grok field names (#21745) (#31653) [DOCS] Fix licensing API details (#31667) [TEST] Mute failing tests in NativeRealmInteg and ReservedRealmInteg Fix CreateSnapshotRequestTests Failure (#31630) Configurable password hashing algorithm/cost (#31234) [TEST] Mute failing NamingConventionsTaskIT tests [DOCS] Replace CONFIG_DIR with ES_PATH_CONF (#31635) Core: Require all actions have a Task (#31627)
* elastic/ccr: (30 commits) Enable setting client path prefix to / (elastic#30119) [DOCS] Secure settings specified per node (elastic#31621) has_parent builder: exception message/param fix (elastic#31182) TEST: Randomize soft-deletes settings (elastic#31585) Mute 'Test typed keys parameter for suggesters' as we await a fix. Build test: Thread linger Fix gradle4.8 deprecation warnings (elastic#31654) Mute FileRealmTests#testAuthenticateCaching with an @AwaitsFix. Mute TransportChangePasswordActionTests#testIncorrectPasswordHashingAlgorithm with an @AwaitsFix. Build: Fix naming conventions task (elastic#31681) Introduce a Hashing Processor (elastic#31087) Do not check for object existence when deleting repository index files (elastic#31680) Remove extra check for object existence in repository-gcs read object (elastic#31661) Support multiple system store types (elastic#31650) [Test] Clean up some repository-s3 tests (elastic#31601) [Docs] Use capital letters in section headings (elastic#31678) muted tests that will be replaced by the shard follow task refactoring: elastic#31581 [DOCS] Add PQL language Plugin (elastic#31237) Merge AzureStorageService and AzureStorageServiceImpl and clean up tests (elastic#31607) TEST: Fix test task invocation (elastic#31657) ...
./gradlew test
was broken by 8557bba.Fails with:
on master
I think simply removing the test task fixes things though (should be ok now since that commit made the test replace action hard against missing
test
tasks right?).