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

fixing flaky vsualize data_table_nontimeindex test #22288

Merged
merged 3 commits into from
Aug 27, 2018

Conversation

ppisljar
Copy link
Member

fixes a flaky test
we didn't check if anything was actually clicked in the clickBucket function

@ppisljar ppisljar added review test Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v7.0.0 v6.5.0 flaky-failing-test labels Aug 23, 2018
@ppisljar ppisljar requested review from kobelb and markov00 August 23, 2018 12:43
@elasticmachine
Copy link
Contributor

💔 Build Failed

@ppisljar
Copy link
Member Author

retest

Copy link
Contributor

@kobelb kobelb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - pending successful CI run, thanks Peter!!!

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fix the flaky test on data_table, but introduced the error on the gauge (not present on master).
Not sure what changed between the two but seems that test should show correct values for fields with fieldFormatters fails because clickMetricEditor toggle off the Metric editor and the subsequent clickBucket doesn't find Split Group liste element because it's already configured and the list of available buckets is already gone.

I think we need to change the clickBucket to have something more stable, without the sleep, and also check every test that use clickBucket.

await PageObjects.common.sleep(500);
await retry.try(async () => {
const chartTypes = await retry.try(
async () => await find.allByCssSelector('li.list-group-item.list-group-menu-item'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to find a better selector than this one, it's also used on the metric list. I know that we then heve a check on the name, but it's not the right way to get this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree, but would probably keep this PR to the minimal change.

const chartString = await chart.getVisibleText();
if (chartString === bucketName) {
await chart.click();
await PageObjects.common.sleep(500);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot rely on a timer to be sure that the click is executed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would be your suggestion ? anyway, i would keep that out of this PR ... in general i think we want to remove every sleep in our tests with something more reliable.

@kobelb
Copy link
Contributor

kobelb commented Aug 23, 2018

Good catch @markov00. Since this test continues failing in master/6.x, I went ahead and skipped it with #22323 and created #22322 to track it needing to be re-enabled.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ppisljar
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@ppisljar
Copy link
Member Author

ppisljar commented Aug 24, 2018

x-pack tests failed to start, but selenium passed ok

10:06:20    │ debg Download https://jcenter.bintray.com/com/jcraft/jsch.agentproxy.sshagent/0.0.7/jsch.agentproxy.sshagent-0.0.7.jar
10:06:20    │ debg Download https://jcenter.bintray.com/com/jcraft/jsch.agentproxy.core/0.0.7/jsch.agentproxy.core-0.0.7.jar
10:06:20    │ debg Download https://jcenter.bintray.com/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar
10:06:20    │ debg Download https://jcenter.bintray.com/org/gradle/gradle-logging/4.3/gradle-logging-4.3.pom
10:06:20    │ debg Download https://jcenter.bintray.com/org/gradle/gradle-logging/4.3/gradle-logging-4.3.jar
10:06:30    │ debg > Task :buildSrc:compileJava
10:06:33    │ debg 
10:06:33    │ debg > Task :buildSrc:compileGroovy
10:06:33    │ERROR Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
10:06:33    │ERROR WARNING: An illegal reflective access operation has occurred
10:06:33    │ERROR WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/var/lib/jenkins/.gradle/caches/4.9/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages()
10:06:33    │ERROR WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod
10:06:33    │ERROR WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
10:06:33    │ERROR WARNING: All illegal access operations will be denied in a future release
10:06:37    │ERROR warning: [options] bootstrap class path not set in conjunction with -source 8
10:06:38    │ERROR 1 warning
10:06:40    │ debg 
10:06:40    │ debg > Task :buildSrc:pluginDescriptors
10:06:40    │ debg > Task :buildSrc:writeVersionProperties
10:06:40    │ debg > Task :buildSrc:processResources
10:06:40    │ debg > Task :buildSrc:classes
10:06:40    │ debg > Task :buildSrc:jar
10:06:40    │ debg > Task :buildSrc:assemble
10:06:41    │ debg > Task :buildSrc:pluginUnderTestMetadata
10:06:41    │ debg Download https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom
10:06:41    │ debg Download https://jcenter.bintray.com/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
10:06:41    │ debg Generating JAR file 'gradle-test-kit-4.9.jar'
10:06:41    │ debg Download https://jcenter.bintray.com/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
10:06:42    │ debg > Task :buildSrc:compileTestJava
10:06:42    │ debg > Task :buildSrc:compileTestGroovy
10:06:42    │ debg > Task :buildSrc:processTestResources NO-SOURCE
10:06:42    │ debg > Task :buildSrc:testClasses
10:06:44    │ debg 
10:06:44    │ debg > Task :buildSrc:test
10:06:44    │ERROR Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
10:06:44    │ERROR WARNING: An illegal reflective access operation has occurred
10:06:44    │ERROR WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/var/lib/jenkins/.gradle/caches/4.9/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages()
10:06:44    │ERROR WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod
10:06:44    │ERROR WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
10:06:44    │ERROR WARNING: All illegal access operations will be denied in a future release
10:06:48    │ debg 
10:06:48    │ debg > Task :buildSrc:validateTaskProperties
10:06:48    │ debg Task property validation finished with warnings:
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'balancersConfig' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'classpath' has @Input annotation used on property of type org.gradle.api.file.FileCollection.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'environmentVariables' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'jvmArgs' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'listenersConfig' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'patternSet' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'systemProperties' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'testClassesDirs' has @Input annotation used on property of type org.gradle.api.file.FileCollection.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'testLoggingConfig' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'com.carrotsearch.gradle.junit4.RandomizedTestingTask': property 'workingDir' has @Input annotation used on property of type java.io.File.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.doc.RestTestsFromSnippetsTask': property 'perSnippet' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.doc.SnippetsTask': property 'perSnippet' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.plugin.PluginPropertiesTask': property 'extension' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.precommit.DependencyLicensesTask': property 'mappings' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.precommit.ForbiddenApisCliTask': property 'execAction' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.precommit.ForbiddenApisCliTask': property 'targetCompatibility' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.precommit.NamingConventionsTask': property 'existingClassesDirs' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'addressAndPort' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'baseDir' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'commandString' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'cwd' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'failureMarker' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'pid' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'pidFile' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'portsFile' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'runLog' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'stopTask' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'waitCondition' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.AntFixture': property 'wrapperScript' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.RestIntegTestTask': property 'nodes' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.RunTask': property 'clusterConfig' is not annotated with an input or output annotation.
10:06:48    │ debg   - Warning: Task type 'org.elasticsearch.gradle.test.VagrantFixture': property 'stopTask' is not annotated with an input or output annotation.
10:06:48    │ debg 
10:06:48    │ debg > Task :buildSrc:check
10:06:48    │ debg > Task :buildSrc:build
10:06:48    │ debg Download https://plugins.gradle.org/m2/com/gradle/build-scan/com.gradle.build-scan.gradle.plugin/1.13.2/com.gradle.build-scan.gradle.plugin-1.13.2.pom
10:07:19    │ERROR 
10:07:19    │ERROR FAILURE: Build failed with an exception.
10:07:19    │ERROR 
10:07:19    │ERROR * Where:
10:07:19    │ERROR Build file '/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/elasticsearch/build.gradle' line: 37
10:07:19    │ERROR 
10:07:19    │ERROR * What went wrong:
10:07:19    │ERROR Error resolving plugin [id: 'com.gradle.build-scan', version: '1.13.2']
10:07:19    │ERROR > Could not resolve all dependencies for configuration 'detachedConfiguration1'.
10:07:19    │ERROR    > Could not determine artifacts for com.gradle.build-scan:com.gradle.build-scan.gradle.plugin:1.13.2
10:07:19    │ERROR       > Could not get resource 'https://plugins.gradle.org/m2/com/gradle/build-scan/com.gradle.build-scan.gradle.plugin/1.13.2/com.gradle.build-scan.gradle.plugin-1.13.2.jar'.
10:07:19    │ERROR          > Could not HEAD 'https://plugins.gradle.org/m2/com/gradle/build-scan/com.gradle.build-scan.gradle.plugin/1.13.2/com.gradle.build-scan.gradle.plugin-1.13.2.jar'.
10:07:19    │ERROR             > Read timed out
10:07:19    │ERROR 
10:07:19    │ERROR * Try:
10:07:19    │ERROR Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
10:07:19    │ERROR 
10:07:19    │ERROR * Get more help at https://help.gradle.org
10:07:19    │ERROR 
10:07:19    │ERROR BUILD FAILED in 1m 23s
10:07:19    │ debg 
10:07:19    │ debg Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
10:07:19    │ debg Use '--warning-mode all' to show the individual deprecation warnings.
10:07:19    │ debg See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
10:07:19 
10:07:19 unable to build ES
10:07:19     at exports.createCliError (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/packages/kbn-es/src/errors.js:21:17)
10:07:19     at createSnapshot (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/packages/kbn-es/src/install/source.js:157:11)
10:07:19     at <anonymous>
10:07:19     at process._tickCallback (internal/process/next_tick.js:188:7)
10:07:19 ```

@ppisljar ppisljar force-pushed the fix/flakyTestDataTable branch from 37fe876 to 976918d Compare August 24, 2018 09:40
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00
Copy link
Member

@ppisljar I think it's better to create an issue for the failing build because of x-pack. I've searched this and found the same error here #20497 (comment) and there: #20111 (comment)
So 3 times in a month seems to be a clue of flaky. @liza-mae what do you think?

@ppisljar
Copy link
Member Author

retest

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. Waiting for few CI test/retest

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppisljar I forgot some files that use the directives here and I want to be sure that everything was taken in consideration:

  • src/ui/public/agg_types/controls/order_agg.html
  • src/ui/public/agg_types/controls/sub_agg.html
  • src/ui/public/agg_types/controls/sub_metric.html
  • src/ui/public/vis/editors/default/tests/agg_params.js line 84
  • src/ui/public/vis/editors/default/agg.html

We have also other two visualize_page method that use the old group-name attribute:

async clickAddMetric() {
     await find.clickByCssSelector('[group-name="metrics"] [data-test-subj="visualizeEditorAddAggregationButton"]');
   }

   async clickAddBucket() {
     await find.clickByCssSelector('[group-name="buckets"] [data-test-subj="visualizeEditorAddAggregationButton"]');
   }

@liza-mae
Copy link
Contributor

I agree @markov00

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00
Copy link
Member

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00
Copy link
Member

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00
Copy link
Member

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ppisljar
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ppisljar ppisljar merged commit cd4d53f into elastic:master Aug 27, 2018
@ppisljar ppisljar deleted the fix/flakyTestDataTable branch August 27, 2018 10:41
ppisljar added a commit to ppisljar/kibana that referenced this pull request Aug 27, 2018
@ppisljar ppisljar restored the fix/flakyTestDataTable branch September 26, 2018 10:06
@liza-mae liza-mae added failed-test A test failure on a tracked branch, potentially flaky-test and removed flaky-failing-test labels Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Feature:Visualizations Generic visualization features (in case no more specific feature label is available) review test v6.5.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants