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

Functional tests: refactor dashboard_page #54588

Merged

Conversation

dmlemeshko
Copy link
Member

The follow-up to #53845 that closes the first item in #53117 to improve the developer's experience in writing functional tests.

Common actions between landing pages of Visualize and Dashboard are move to listingTable service, duplicated code is deleted. dashboard_page contains only Dashboard-specific actions.

@dmlemeshko
Copy link
Member Author

@elasticmachine merge upstream

@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0 labels Jan 13, 2020
@dmlemeshko
Copy link
Member Author

@elasticmachine merge upstream

@dmlemeshko
Copy link
Member Author

@elasticmachine merge upstream

@dmlemeshko dmlemeshko marked this pull request as ready for review January 14, 2020 08:28
@dmlemeshko
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dmlemeshko
Copy link
Member Author

Last 2 failures were not caused by my changes:

  • Build Custom Background Sets for Significant Term Queries #20047 failed: Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/discover/feature_controls/discover_security·ts.discover feature controls security global discover all privileges allow saving via the saved query management component popover with no query loaded
[00:06:28]                 │ info [logstash_functional] Loading "mappings.json"
[00:06:28]                 │ info [logstash_functional] Loading "data.json.gz"
[00:06:28]                 │ info [o.e.a.s.m.TransportMasterNodeAction] [kibana-ci-immutable-centos-tests-xl-1578990066669365586] unexpected exception during publication
[00:06:28]                 │      org.elasticsearch.ResourceAlreadyExistsException: index [logstash-2015.09.22/4LxmCUfQSXWZrc6Y7AGucA] already exists
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:147) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:616) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$IndexCreationTask.execute(MetaDataCreateIndexService.java:291) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.ClusterStateUpdateTask.execute(ClusterStateUpdateTask.java:47) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:697) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:319) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:214) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:151) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:699) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
[00:06:28]                 │      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
[00:06:28]                 │      	at java.lang.Thread.run(Thread.java:830) [?:?]
[00:06:28]                 │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:06:28]                 │ info [o.e.a.s.m.TransportMasterNodeAction] [kibana-ci-immutable-centos-tests-xl-1578990066669365586] unexpected exception during publication
[00:06:28]                 │      org.elasticsearch.ResourceAlreadyExistsException: index [logstash-2015.09.20/1mtDU8UbTJCZCw5u_Bn_KQ] already exists
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:147) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:616) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$IndexCreationTask.execute(MetaDataCreateIndexService.java:291) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.ClusterStateUpdateTask.execute(ClusterStateUpdateTask.java:47) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:697) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:319) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:214) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:151) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:699) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
[00:06:28]                 │      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
[00:06:28]                 │      	at java.lang.Thread.run(Thread.java:830) [?:?]
[00:06:28]                 │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:06:28]                 │ info [o.e.a.s.m.TransportMasterNodeAction] [kibana-ci-immutable-centos-tests-xl-1578990066669365586] unexpected exception during publication
[00:06:28]                 │      org.elasticsearch.ResourceAlreadyExistsException: index [logstash-2015.09.21/PQQkUZMNQPiNriZ1RTfwlQ] already exists
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:147) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:616) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$IndexCreationTask.execute(MetaDataCreateIndexService.java:291) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.ClusterStateUpdateTask.execute(ClusterStateUpdateTask.java:47) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:697) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:319) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:214) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:151) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:699) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:06:28]                 │      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
[00:06:28]                 │      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
[00:06:28]                 │      	at java.lang.Thread.run(Thread.java:830) [?:?]

jobs:elastic+kibana+pipeline-pull-request:20047:ki

- Build #19873 failed: Jest tests were not touch by PR - Kibana Pipeline / x-pack-intake-agent / x-pack-intake / X-Pack Jest Tests.x-pack/legacy/plugins/alerting/server/task_runner.Task Runner recovers gracefully when the Alert Task Runner throws an exception when fetching the encrypted attributes - Kibana Pipeline / x-pack-intake-agent / x-pack-intake / X-Pack Jest Tests.x-pack/legacy/plugins/alerting/server/task_runner.Task Runner recovers gracefully when the Alert Task Runner throws an exception when getting internal Services - Kibana Pipeline / x-pack-intake-agent / x-pack-intake / X-Pack Jest Tests.x-pack/legacy/plugins/alerting/server/task_runner.Task Runner recovers gracefully when the Alert Task Runner throws an exception when fetching attributes


async setLogstashDataRange() {
const fromTime = 'Apr 9, 2018 @ 00:00:00.000';
const toTime = 'Apr 13, 2018 @ 00:00:00.000';
Copy link
Member

Choose a reason for hiding this comment

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

Why these dates in this fn, and the previous fn?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was transferred from dashboard_page.js because it is not dashboard action, but time picker. There are 3 of these functions and they set an interval according to data in ES archivers.

Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

LGTM

@dmlemeshko dmlemeshko merged commit 040aee9 into elastic:master Jan 14, 2020
@dmlemeshko dmlemeshko added v7.6.0 and removed v7.7.0 labels Jan 14, 2020
dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Jan 14, 2020
* [test/functional] cleanup & tsfy dashboard_page

* fix & improvement

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
dmlemeshko added a commit that referenced this pull request Jan 14, 2020
* [test/functional] cleanup & tsfy dashboard_page

* fix & improvement

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
* [test/functional] cleanup & tsfy dashboard_page

* fix & improvement

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@dmlemeshko dmlemeshko deleted the func-tests/refactor-dashboard-page branch January 31, 2022 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes test_ui_functional v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants