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] TopNFunctionTests testToXContent failing #107117

Closed
volodk85 opened this issue Apr 4, 2024 · 4 comments · Fixed by #107134
Closed

[CI] TopNFunctionTests testToXContent failing #107117

volodk85 opened this issue Apr 4, 2024 · 4 comments · Fixed by #107134
Assignees
Labels
low-risk An open issue or test failure that is a low risk to future releases Team:obs-knowledge Meta label for Observability Knowledge team >test-failure Triaged test failures from CI :UniversalProfiling/Application Elastic Universal Profiling REST APIs and infrastructure

Comments

@volodk85
Copy link
Contributor

volodk85 commented Apr 4, 2024

Build scan:
https://gradle-enterprise.elastic.co/s/7xflis3rynd4c/tests/:x-pack:plugin:profiling:test/org.elasticsearch.xpack.profiling.TopNFunctionTests/testToXContent

Reproduction line:

./gradlew ':x-pack:plugin:profiling:test' --tests "org.elasticsearch.xpack.profiling.TopNFunctionTests.testToXContent" -Dtests.seed=EAF625C06B1EA6AD -Dtests.locale=es-MX -Dtests.timezone=Europe/Uzhgorod -Druntime.java=22

Applicable branches:
main

Reproduces locally?:
Didn't try

Failure history:
Failure dashboard for org.elasticsearch.xpack.profiling.TopNFunctionTests#testToXContent

Failure excerpt:

java.lang.AssertionError: Error when comparing xContent.
                         frame: 
                 address_or_line: same [23]
            executable_file_name: same [python3.9]
                       file_name: same [/build/python3.9-RNBry6/python3.9-3.9.2/Objects/di...]
                      frame_type: same [1]
                   function_name: same [PyDict_GetItemWithError]
                          inline: same [false]
                     line_number: same [1456]
                            id: same [1541563405]
                          rank: same [1]
          self_annual_co2_tons: same [2.2]
         self_annual_costs_usd: expected String [12.0000] but was Double [12.0]
                    self_count: same [1]
                    sub_groups: 
                          basket: same [7]
         total_annual_co2_tons: same [22.0]
        total_annual_costs_usd: expected String [120.0000] but was Double [120.0]
                   total_count: same [10]

  at __randomizedtesting.SeedInfo.seed([EAF625C06B1EA6AD:CED2278C212E846]:0)
  at org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent(ElasticsearchAssertions.java:834)
  at org.elasticsearch.xpack.profiling.TopNFunctionTests.testToXContent(TopNFunctionTests.java:82)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  at java.lang.reflect.Method.invoke(Method.java:580)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.junit.rules.RunRules.evaluate(RunRules.java:20)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.junit.rules.RunRules.evaluate(RunRules.java:20)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at org.junit.rules.RunRules.evaluate(RunRules.java:20)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1570)

  Caused by: java.lang.AssertionError: expected:<12.0000> but was:<12.0>

    at org.junit.Assert.fail(Assert.java:89)
    at org.junit.Assert.failNotEquals(Assert.java:835)
    at org.junit.Assert.assertEquals(Assert.java:120)
    at org.junit.Assert.assertEquals(Assert.java:146)
    at org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertObjectEquals(ElasticsearchAssertions.java:902)
    at org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertMapEquals(ElasticsearchAssertions.java:869)
    at org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent(ElasticsearchAssertions.java:830)
    at org.elasticsearch.xpack.profiling.TopNFunctionTests.testToXContent(TopNFunctionTests.java:82)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke(Method.java:580)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
    at java.lang.Thread.run(Thread.java:1570)

@volodk85 volodk85 added :UniversalProfiling/Application Elastic Universal Profiling REST APIs and infrastructure >test-failure Triaged test failures from CI labels Apr 4, 2024
@elasticsearchmachine elasticsearchmachine added blocker Team:obs-knowledge Meta label for Observability Knowledge team labels Apr 4, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/obs-knowledge-team (Team:obs-knowledge)

@danielmitterdorfer danielmitterdorfer self-assigned this Apr 5, 2024
@danielmitterdorfer danielmitterdorfer added low-risk An open issue or test failure that is a low risk to future releases and removed blocker labels Apr 5, 2024
@danielmitterdorfer
Copy link
Member

test issue -> low risk.

danielmitterdorfer added a commit to danielmitterdorfer/elasticsearch that referenced this issue Apr 5, 2024
With this commit we use the same XContent API (`rawValue`) in the test
as in the actual code in order to ensure the test expects the correct
value (i.e. this was a test bug).

Closes elastic#107117
@rockdaboot
Copy link
Contributor

The issue is not reproducible for me locally on latest main (0faac52). What do I miss?

danielmitterdorfer added a commit that referenced this issue Apr 8, 2024
With this commit we use the same XContent API (`rawValue`) in the test
as in the actual code in order to ensure the test expects the correct
value (i.e. this was a test bug).

Closes #107117
@danielmitterdorfer
Copy link
Member

The issue is not reproducible for me locally on latest main (0faac52). What do I miss?

To close the loop here: we discussed offline that this has been caused by the @AwaitsFix annotation preventing the test being executed. After this has been removed the test failure was reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-risk An open issue or test failure that is a low risk to future releases Team:obs-knowledge Meta label for Observability Knowledge team >test-failure Triaged test failures from CI :UniversalProfiling/Application Elastic Universal Profiling REST APIs and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants