Skip to content

Commit

Permalink
Revert "render-test-flakiness:clear worker storage (#11111)"
Browse files Browse the repository at this point in the history
This reverts commit 1c416c6.
  • Loading branch information
karimnaaji committed Oct 21, 2021
1 parent 979c15a commit 11319b4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 deletions.
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
orbs:
aws-cli: circleci/aws-cli@1.4.0
browser-tools: circleci/browser-tools@1.2.3
browser-tools: circleci/browser-tools@1.1.1

workflows:
version: 2
Expand Down Expand Up @@ -245,7 +245,8 @@ jobs:
steps:
- attach_workspace:
at: ~/
- browser-tools/install-chrome
- browser-tools/install-chrome:
chrome-version: 91.0.4472.164
- run: yarn run test-render
- store_test_results:
path: test/integration/render-tests
Expand All @@ -257,7 +258,8 @@ jobs:
steps:
- attach_workspace:
at: ~/
- browser-tools/install-chrome
- browser-tools/install-chrome:
chrome-version: 91.0.4472.164
- run: yarn run test-render-prod
- store_test_results:
path: test/integration/render-tests
Expand All @@ -269,7 +271,8 @@ jobs:
steps:
- attach_workspace:
at: ~/
- browser-tools/install-chrome
- browser-tools/install-chrome:
chrome-version: 91.0.4472.164
- run: yarn run test-query
- store_test_results:
path: test/integration/query-tests
Expand All @@ -296,7 +299,8 @@ jobs:
steps:
- attach_workspace:
at: ~/
- browser-tools/install-chrome
- browser-tools/install-chrome:
chrome-version: 91.0.4472.164
- run:
name: Collect performance stats
command: node bench/gl-stats.js
Expand Down
8 changes: 0 additions & 8 deletions src/source/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ export default class Worker {
};
}

clearCaches(mapId: string, unused: mixed, callback: WorkerTileCallback) {
delete this.layerIndexes[mapId];
delete this.availableImages[mapId];
delete this.workerSources[mapId];
delete this.demWorkerSources[mapId];
callback();
}

checkIfReady(mapID: string, unused: mixed, callback: WorkerTileCallback) {
// noop, used to check if a worker is fully set up and ready to receive messages
callback();
Expand Down
4 changes: 0 additions & 4 deletions src/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -1774,10 +1774,6 @@ class Style extends Evented {
hasCircleLayers(): boolean {
return this._numCircleLayers > 0;
}

clearWorkerCaches() {
this.dispatcher.broadcast('clearCaches');
}
}

Style.getSourceType = getSourceType;
Expand Down
3 changes: 0 additions & 3 deletions src/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3176,9 +3176,6 @@ class Map extends Camera {
}
this._renderTaskQueue.clear();
this._domRenderTaskQueue.clear();
if (this.style) {
this.style.clearWorkerCaches();
}
this.painter.destroy();
this.handlers.destroy();
delete this.handlers;
Expand Down
2 changes: 1 addition & 1 deletion test/integration/lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async function runTest(t) {
];
}

if (!process.env.CI) browserWriteFile.postMessage(fileInfo);
browserWriteFile.postMessage(fileInfo);

} catch (e) {
t.error(e);
Expand Down
3 changes: 1 addition & 2 deletions test/integration/lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function ensureTeardown(t) {
delete map.painter.context.gl;
map = null;
}
mapboxgl.clearStorage();
expectedCtx.clearRect(0, 0, expectedCanvas.width, expectedCanvas.height);
diffCtx.clearRect(0, 0, diffCanvas.width, diffCanvas.height);

Expand Down Expand Up @@ -309,7 +308,7 @@ async function runTest(t) {
updateHTML(testMetaData);
}

if (!process.env.CI) browserWriteFile.postMessage(fileInfo);
browserWriteFile.postMessage(fileInfo);

} catch (e) {
t.error(e);
Expand Down

0 comments on commit 11319b4

Please sign in to comment.