From 61bdc635611e05ff745f6f3bda292848f6c1ac7a Mon Sep 17 00:00:00 2001 From: archmoj Date: Mon, 4 Mar 2019 06:05:04 -0500 Subject: [PATCH 1/5] less flaky - step 1 --- .circleci/config.yml | 16 ++++++++++++++++ .circleci/test.sh | 9 ++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d90a808532f..c91d5b070ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,6 +70,19 @@ jobs: name: Run jasmine tests (batch 2) command: ./.circleci/test.sh jasmine2 + test-jasmine3: + docker: + # need '-browsers' version to test in real (xvfb-wrapped) browsers + - image: circleci/node:10.9.0-browsers + working_directory: ~/plotly.js + steps: + - checkout + - attach_workspace: + at: ~/plotly.js + - run: + name: Run jasmine tests (batch 3) + command: ./.circleci/test.sh jasmine3 + test-image: docker: - image: plotly/testbed:latest @@ -165,6 +178,9 @@ workflows: - test-jasmine2: requires: - build + - test-jasmine3: + requires: + - build - test-image: requires: - build diff --git a/.circleci/test.sh b/.circleci/test.sh index b1861b936cf..445a215dc70 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -45,7 +45,6 @@ case $1 in set_tz npm run test-jasmine -- --skip-tags=gl,noCI,flaky || EXIT_STATE=$? - retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI npm run test-bundle || EXIT_STATE=$? exit $EXIT_STATE @@ -63,6 +62,14 @@ case $1 in exit $EXIT_STATE ;; + jasmine3) + set_tz + + npm run test-jasmine -- --tags=flaky --skip-tags=gl,noCI || EXIT_STATE=$? + + exit $EXIT_STATE + ;; + image) npm run test-image || EXIT_STATE=$? exit $EXIT_STATE From 6c8804f413e83eb82fc37370c483285bf9362f54 Mon Sep 17 00:00:00 2001 From: archmoj Date: Mon, 4 Mar 2019 11:13:29 -0500 Subject: [PATCH 2/5] trying shards in jasmine3 test --- .circleci/test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/test.sh b/.circleci/test.sh index 445a215dc70..5a3106f76b8 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -65,7 +65,11 @@ case $1 in jasmine3) set_tz - npm run test-jasmine -- --tags=flaky --skip-tags=gl,noCI || EXIT_STATE=$? + SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=flaky)) + + for s in ${SHARDS[@]}; do + retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI + done exit $EXIT_STATE ;; From 97df9d6c2fffb671a32195fe264f7596c5ca4ef2 Mon Sep 17 00:00:00 2001 From: archmoj Date: Mon, 4 Mar 2019 11:30:37 -0500 Subject: [PATCH 3/5] double double-click delay --- test/jasmine/tests/select_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js index 7128933bd84..3c84f266900 100644 --- a/test/jasmine/tests/select_test.js +++ b/test/jasmine/tests/select_test.js @@ -175,7 +175,7 @@ describe('Click-to-select', function() { } else { setTimeout(function() { click(x, y, clickOpts); - }, DBLCLICKDELAY * 1.01); + }, DBLCLICKDELAY * 2); } return selectedPromise; From 596df643d368e93c7e77b8b088759a93c9439d87 Mon Sep 17 00:00:00 2001 From: archmoj Date: Mon, 4 Mar 2019 12:10:32 -0500 Subject: [PATCH 4/5] use loop variable --- .circleci/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test.sh b/.circleci/test.sh index 5a3106f76b8..62fd478837f 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -68,7 +68,7 @@ case $1 in SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=flaky)) for s in ${SHARDS[@]}; do - retry npm run test-jasmine -- --tags=flaky --skip-tags=noCI + retry npm run test-jasmine -- "$s" --tags=flaky --skip-tags=noCI done exit $EXIT_STATE From b05d15ca3d5c0eda7dbe95d5db30a70488796375 Mon Sep 17 00:00:00 2001 From: archmoj Date: Tue, 5 Mar 2019 14:40:35 -0500 Subject: [PATCH 5/5] lower bouble click delay --- test/jasmine/tests/select_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js index 3c84f266900..5f788d6d80a 100644 --- a/test/jasmine/tests/select_test.js +++ b/test/jasmine/tests/select_test.js @@ -175,7 +175,7 @@ describe('Click-to-select', function() { } else { setTimeout(function() { click(x, y, clickOpts); - }, DBLCLICKDELAY * 2); + }, DBLCLICKDELAY * 1.03); } return selectedPromise;