Skip to content
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

[CI] IndexActionTests.testIndexActionExecuteSingleDoc Fails #38581

Closed
Tim-Brooks opened this issue Feb 7, 2019 · 4 comments · Fixed by #38577 or #38738
Closed

[CI] IndexActionTests.testIndexActionExecuteSingleDoc Fails #38581

Tim-Brooks opened this issue Feb 7, 2019 · 4 comments · Fixed by #38577 or #38738

Comments

@Tim-Brooks
Copy link
Contributor

2> REPRODUCE WITH: ./gradlew :x-pack:plugin:watcher:unitTest -Dtests.seed=CEACAAD7B7542031 -Dtests.class=org.elasticsearch.xpack.watcher.actions.index.IndexActionTests -Dtests.method="testIndexActionExecuteSingleDoc" -Dtests.security.manager=true -Dtests.locale=es-419 -Dtests.timezone=Africa/Abidjan -Dcompiler.java=11 -Druntime.java=11
FAILURE 0.05s | IndexActionTests.testIndexActionExecuteSingleDoc <<< FAILURES!

Throwable #1: java.lang.AssertionError:
Expected: map containing ["@timestamp"->"2019-02-07T17:18:30.820305Z"]
but: map was [<@timestamp=2019-02-07T17:18:30.820Z>, <foo=bar>]
at __randomizedtesting.SeedInfo.seed([CEACAAD7B7542031:7903D0E951B5DC99]:0)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.elasticsearch.xpack.watcher.actions.index.IndexActionTests.testIndexActionExecuteSingleDoc(IndexActionTests.java:330)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.lang.Thread.run(Thread.java:834)

@Tim-Brooks Tim-Brooks added >test-failure Triaged test failures from CI v8.0.0 v7.2.0 labels Feb 7, 2019
@Tim-Brooks
Copy link
Contributor Author

It is possible that the fix for this is related to #38511.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

pgomulka added a commit that referenced this issue Feb 8, 2019
In different places across the code base the ZonedDateTime in
milliseconds resolution has to be used for testing. Refactoring this to
a single place to avoid code duplication

closes #38511
closes #38581
@pgomulka pgomulka reopened this Feb 11, 2019
pgomulka added a commit that referenced this issue Feb 11, 2019
pgomulka added a commit to pgomulka/elasticsearch that referenced this issue Feb 11, 2019
pgomulka added a commit to pgomulka/elasticsearch that referenced this issue Feb 11, 2019
@alpar-t
Copy link
Contributor

alpar-t commented Feb 11, 2019

pgomulka added a commit that referenced this issue Feb 11, 2019
@pgomulka
Copy link
Contributor

pgomulka commented Feb 11, 2019

I mute that in master, 7.0 and 7.1 until fixed
From Alpar's link above

./gradlew :x-pack:plugin:watcher:unitTest -Dtests.seed=A13250D3D1AD0EE3 -Dtests.class=org.elasticsearch.xpack.watcher.actions.index.IndexActionTests -Dtests.method="testIndexActionExecuteSingleDoc" -Dtests.security.manager=true -Dtests.locale=en-IE -Dtests.timezone=America/Nassau -Dcompiler.java=11 -Druntime.java=8

to reproduce the test code has to be modified to fix the date with millis part having trailing zeros
like
2019-02-11T09:38:56.5Z vs 2019-02-11T09:38:56.500Z

 ZonedDateTime executionTime =
            DateUtils.nowWithMillisResolution(
                Clock.fixed(ZonedDateTime.of(2019,02,11,9,38,56,5,ZoneOffset.UTC).toInstant(),ZoneOffset.UTC));
        ```

pgomulka added a commit that referenced this issue Feb 12, 2019
fix tests to use clock in milliseconds precision in watcher code
make sure the date comparison in string format is using same formatters
some of the code was modified in #38514 possibly because of merge conflicts

closes #38581
pgomulka added a commit to pgomulka/elasticsearch that referenced this issue Feb 12, 2019
fix tests to use clock in milliseconds precision in watcher code
make sure the date comparison in string format is using same formatters
some of the code was modified in elastic#38514 possibly because of merge conflicts

closes elastic#38581
pgomulka added a commit to pgomulka/elasticsearch that referenced this issue Feb 12, 2019
fix tests to use clock in milliseconds precision in watcher code
make sure the date comparison in string format is using same formatters
some of the code was modified in elastic#38514 possibly because of merge conflicts

closes elastic#38581
pgomulka added a commit that referenced this issue Feb 12, 2019


fix tests to use clock in milliseconds precision in watcher code
make sure the date comparison in string format is using same formatters
some of the code was modified in #38514 possibly because of merge conflicts

closes #38581
Backport #38738
pgomulka added a commit that referenced this issue Feb 12, 2019


fix tests to use clock in milliseconds precision in watcher code
make sure the date comparison in string format is using same formatters
some of the code was modified in #38514 possibly because of merge conflicts

closes #38581
Backport #38738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants