Skip to content

Commit 34158c1

Browse files
committed
using different retry numbers for gl and flaky containers
reduced number of retries for jasmine-2 reduced number of retries for jasmine-3 adjusted timeouts to help fix test errors on CI removed noCI tags from a number of tests set shards limit to 1 - fixed various side effects between different tests reduce n it limit to reduce side effects between different tests now we can reduce retries for both now test if we could remove some noCI flags from the tests reset few noCI flags final considerations
1 parent c60bac2 commit 34158c1

File tree

10 files changed

+49
-38
lines changed

10 files changed

+49
-38
lines changed

.circleci/test.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ set +o pipefail
66

77
ROOT=$(dirname $0)/..
88
EXIT_STATE=0
9-
MAX_AUTO_RETRY=5
109

1110
log () {
1211
echo -e "\n$1"
1312
}
1413

1514
# inspired by https://unix.stackexchange.com/a/82602
15+
MAX_AUTO_RETRY=1
1616
retry () {
1717
local n=1
1818

@@ -54,9 +54,9 @@ case $1 in
5454
set_tz
5555

5656
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=gl))
57-
57+
MAX_AUTO_RETRY=2
5858
for s in ${SHARDS[@]}; do
59-
retry npm run test-jasmine -- "$s" --tags=gl --skip-tags=noCI
59+
retry npm run test-jasmine -- "${s}" --tags=gl --skip-tags=noCI
6060
done
6161

6262
exit $EXIT_STATE
@@ -66,9 +66,9 @@ case $1 in
6666
set_tz
6767

6868
SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --tag=flaky))
69-
69+
MAX_AUTO_RETRY=5
7070
for s in ${SHARDS[@]}; do
71-
retry npm run test-jasmine -- "$s" --tags=flaky --skip-tags=noCI
71+
retry npm run test-jasmine -- "${s}" --tags=flaky --skip-tags=noCI
7272
done
7373

7474
exit $EXIT_STATE

tasks/shard_jasmine_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var argv = minimist(process.argv.slice(2), {
1515
limit: ['l'],
1616
},
1717
default: {
18-
limit: 20
18+
limit: 1
1919
}
2020
});
2121

test/jasmine/tests/gl2d_click_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ describe('Test hover and click interactions', function() {
561561
});
562562
});
563563

564-
describe('@noCI Test gl2d lasso/select:', function() {
564+
describe('Test gl2d lasso/select:', function() {
565565
var mockFancy = require('@mocks/gl2d_14.json');
566566
delete mockFancy.layout.xaxis.autorange;
567567
delete mockFancy.layout.yaxis.autorange;
@@ -613,7 +613,7 @@ describe('@noCI Test gl2d lasso/select:', function() {
613613
function select(path) {
614614
return new Promise(function(resolve, reject) {
615615
gd.once('plotly_selected', resolve);
616-
setTimeout(function() { reject('did not trigger *plotly_selected*');}, 200);
616+
setTimeout(function() { reject('did not trigger *plotly_selected*');}, 300);
617617
drag(path);
618618
});
619619
}

test/jasmine/tests/gl2d_plot_interact_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ describe('Test gl plot side effects', function() {
215215
.then(done);
216216
});
217217

218-
it('@noCI @gl should fire *plotly_webglcontextlost* when on webgl context lost', function(done) {
218+
it('@gl should fire *plotly_webglcontextlost* when on webgl context lost', function(done) {
219219
var _mock = Lib.extendDeep({}, require('@mocks/gl2d_12.json'));
220220

221221
function _trigger(name) {
@@ -551,7 +551,7 @@ describe('Test gl2d plots', function() {
551551
.then(done);
552552
});
553553

554-
it('@noCI @gl should display selection of big number of regular points', function(done) {
554+
it('@gl should display selection of big number of regular points', function(done) {
555555
// generate large number of points
556556
var x = [];
557557
var y = [];
@@ -582,7 +582,7 @@ describe('Test gl2d plots', function() {
582582
.then(done);
583583
});
584584

585-
it('@noCI @gl should display selection of big number of miscellaneous points', function(done) {
585+
it('@gl should display selection of big number of miscellaneous points', function(done) {
586586
var colorList = [
587587
'#006385', '#F06E75', '#90ed7d', '#f7a35c', '#8085e9',
588588
'#f15c80', '#e4d354', '#2b908f', '#f45b5b', '#91e8e1',

test/jasmine/tests/gl2d_pointcloud_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ describe('pointcloud traces', function() {
196196
it('@gl should not change other traces colors', function(done) {
197197
var _mock = Lib.extendDeep({}, multipleScatter2dMock);
198198
Plotly.plot(gd, _mock)
199-
.then(delay(40))
199+
.then(delay(20))
200200
.then(function() {
201201
var canvas = d3.select('.gl-canvas-context').node();
202202

@@ -226,13 +226,13 @@ describe('pointcloud traces', function() {
226226
}
227227

228228
Plotly.plot(gd, Lib.extendDeep({}, plotData))
229-
.then(delay(40))
229+
.then(delay(20))
230230
.then(function() {
231231
_assertRange('base', [-0.548, 9.548], [-1.415, 10.415]);
232232
})
233-
.then(delay(40))
233+
.then(delay(20))
234234
.then(function() { _drag([200, 200], [350, 350]); })
235-
.then(delay(40))
235+
.then(delay(20))
236236
.then(function() {
237237
_assertRange('after zoombox drag', [0.768, 1.591], [5.462, 7.584]);
238238
})
@@ -248,9 +248,9 @@ describe('pointcloud traces', function() {
248248
.then(function() {
249249
return Plotly.relayout(gd, 'dragmode', 'pan');
250250
})
251-
.then(delay(40))
251+
.then(delay(20))
252252
.then(function() { _drag([200, 200], [350, 350]); })
253-
.then(delay(40))
253+
.then(delay(20))
254254
.then(function() {
255255
_assertRange('after pan drag', [0.2743, 10.3719], [-3.537, 8.292]);
256256
})

test/jasmine/tests/parcoords_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ describe('parcoords edge cases', function() {
509509
.then(done);
510510
});
511511

512-
it('@noCI @gl Works with 60 dimensions', function(done) {
512+
it('@gl Works with 60 dimensions', function(done) {
513513

514514
var mockCopy = Lib.extendDeep({}, mock1);
515515
var newDimension, i, j;
@@ -539,7 +539,7 @@ describe('parcoords edge cases', function() {
539539
.then(done);
540540
});
541541

542-
it('@noCI @gl Truncates 60+ dimensions to 60', function(done) {
542+
it('@gl Truncates 60+ dimensions to 60', function(done) {
543543

544544
var mockCopy = Lib.extendDeep({}, mock1);
545545
var newDimension, i, j;
@@ -567,7 +567,7 @@ describe('parcoords edge cases', function() {
567567
.then(done);
568568
});
569569

570-
it('@noCI @gl Truncates dimension values to the shortest array, retaining only 3 lines', function(done) {
570+
it('@gl Truncates dimension values to the shortest array, retaining only 3 lines', function(done) {
571571

572572
var mockCopy = Lib.extendDeep({}, mock1);
573573
var newDimension, i, j;
@@ -1218,7 +1218,7 @@ describe('parcoords basic use', function() {
12181218
});
12191219
});
12201220

1221-
describe('@noCI parcoords constraint interactions', function() {
1221+
describe('parcoords constraint interactions', function() {
12221222
var gd, initialDashArray0, initialDashArray1;
12231223

12241224
function initialFigure() {
@@ -1302,7 +1302,7 @@ describe('@noCI parcoords constraint interactions', function() {
13021302
expect(dashArray.length).toBe(segmentCount, dashArray);
13031303
}
13041304

1305-
it('@gl snaps ordinal constraints', function(done) {
1305+
it('@noCI @gl snaps ordinal constraints', function(done) {
13061306
// first: drag almost to 2 but not quite - constraint will snap back to [2.75, 4]
13071307
mostOfDrag(105, 165, 105, 190);
13081308
var newDashArray = getDashArray(0);
@@ -1380,7 +1380,7 @@ describe('@noCI parcoords constraint interactions', function() {
13801380
.then(done);
13811381
});
13821382

1383-
it('@gl updates continuous constraints with no snap', function(done) {
1383+
it('@noCI @gl updates continuous constraints with no snap', function(done) {
13841384
// first: extend 7 to 5
13851385
mostOfDrag(295, 160, 295, 200);
13861386
var newDashArray = getDashArray(1);

test/jasmine/tests/plot_api_react_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ describe('@noCIdep Plotly.react', function() {
700700
.then(done);
701701
});
702702

703-
it('can change parcoords aggregations', function(done) {
703+
it('@gl can change parcoords aggregations', function(done) {
704704
Plotly.newPlot(gd, aggregatedParcoords(0))
705705
.then(checkValues(aggParcoords0Vals))
706706

@@ -717,7 +717,7 @@ describe('@noCIdep Plotly.react', function() {
717717
.then(done);
718718
});
719719

720-
it('can change type with aggregations', function(done) {
720+
it('@gl can change type with aggregations', function(done) {
721721
Plotly.newPlot(gd, aggregatedScatter(1))
722722
.then(checkCalcData(aggScatter1CD))
723723

@@ -1766,7 +1766,7 @@ describe('Plotly.react and uirevision attributes', function() {
17661766
_run(fig, editEditable, checkAttrs(true), checkAttrs).then(done);
17671767
});
17681768

1769-
it('preserves editable: true name, colorbar title and parcoords constraint range via trace.uirevision', function(done) {
1769+
it('@gl preserves editable: true name, colorbar title and parcoords constraint range via trace.uirevision', function(done) {
17701770
function fig(mainRev, traceRev) {
17711771
return {
17721772
data: [{

test/jasmine/tests/polar_test.js

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -899,16 +899,12 @@ describe('Test polar interactions:', function() {
899899
}
900900

901901
function _reset() {
902-
return delay(100)()
903-
.then(function() { return _doubleClick(mid); })
904-
.then(function() {
905-
relayoutNumber++;
906-
resetNumber++;
902+
relayoutNumber++;
903+
resetNumber++;
907904

908-
var extra = '(reset ' + resetNumber + ')';
909-
_assertBase(extra);
910-
expect(eventCnts.plotly_doubleclick).toBe(resetNumber, 'doubleclick event #' + extra);
911-
});
905+
var extra = '(reset ' + resetNumber + ')';
906+
_assertBase(extra);
907+
expect(eventCnts.plotly_doubleclick).toBe(resetNumber, 'doubleclick event #' + extra);
912908
}
913909

914910
_plot(fig)
@@ -917,21 +913,33 @@ describe('Test polar interactions:', function() {
917913
.then(function() {
918914
_assertDrag([0, 5.24], 'from center move toward bottom-right');
919915
})
916+
.then(delay(20))
917+
.then(function() { return _doubleClick(mid); })
918+
.then(delay(20))
920919
.then(_reset)
921920
.then(function() { return _drag(mid, [-50, -50]); })
922921
.then(function() {
923922
_assertDrag([0, 5.24], 'from center move toward top-left');
924923
})
924+
.then(delay(20))
925+
.then(function() { return _doubleClick(mid); })
926+
.then(delay(20))
925927
.then(_reset)
926928
.then(function() { return _drag([mid[0] + 30, mid[0] - 30], [50, -50]); })
927929
.then(function() {
928930
_assertDrag([3.1, 8.4], 'from quadrant #1 move top-right');
929931
})
932+
.then(delay(20))
933+
.then(function() { return _doubleClick(mid); })
934+
.then(delay(20))
930935
.then(_reset)
931936
.then(function() { return _drag([345, 200], [-50, 0]); })
932937
.then(function() {
933938
_assertDrag([7.0, 11.1], 'from right edge move left');
934939
})
940+
.then(delay(20))
941+
.then(function() { return _doubleClick(mid); })
942+
.then(delay(20))
935943
.then(_reset)
936944
.then(function() { return _drag(mid, [10, 10]);})
937945
.then(function() { _assertBase('from center to not far enough'); })
@@ -943,6 +951,9 @@ describe('Test polar interactions:', function() {
943951
expect(eventCnts.plotly_relayout)
944952
.toBe(relayoutNumber, 'no new relayout events after *not far enough* cases');
945953
})
954+
.then(delay(20))
955+
.then(function() { return _doubleClick(mid); })
956+
.then(delay(20))
946957
.then(_reset)
947958
.then(function() { return Plotly.relayout(gd, 'polar.hole', 0.2); })
948959
.then(function() { relayoutNumber++; })

test/jasmine/tests/select_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ describe('Click-to-select', function() {
658658
{ mapboxAccessToken: require('@build/credentials.json').MAPBOX_ACCESS_TOKEN })
659659
]
660660
.forEach(function(testCase) {
661-
it('@noCI @gl trace type ' + testCase.label, function(done) {
661+
it('@gl trace type ' + testCase.label, function(done) {
662662
_run(testCase, done);
663663
});
664664
});

test/jasmine/tests/splom_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ describe('Test splom interactions:', function() {
943943
.then(done);
944944
});
945945

946-
it('@noCI @gl should clear graph and replot when canvas and WebGL context dimensions do not match', function(done) {
946+
it('@gl should clear graph and replot when canvas and WebGL context dimensions do not match', function(done) {
947947
var fig = Lib.extendDeep({}, require('@mocks/splom_iris.json'));
948948

949949
function assertDims(msg, w, h) {
@@ -1737,7 +1737,7 @@ describe('Test splom select:', function() {
17371737
.then(done);
17381738
});
17391739

1740-
it('@noCI @gl should behave correctly during select->dblclick->pan scenarios', function(done) {
1740+
it('@gl should behave correctly during select->dblclick->pan scenarios', function(done) {
17411741
var fig = Lib.extendDeep({}, require('@mocks/splom_0.json'));
17421742
fig.layout = {
17431743
width: 400,

0 commit comments

Comments
 (0)