mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) limit retries of uploads to external store in tests
Summary: If an external store fails completely, Grist will continue to retry uploading to it. This diff updated the HostedStorageManager test to limit the extent of these retries to the test itself - otherwise they continue for all other tests in the same process, potentially disrupting those that read logs. There are other tests that use s3, but they aren't run in the same process with delicate log-reading tests, and it isn't quite as clear what improvement to make there. Test Plan: artificially made external store fail, and checked that test contamination seen previously no longer occurs. Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3469
This commit is contained in:
@@ -438,6 +438,13 @@ export class HostedStorageManager implements IDocStorageManager {
|
||||
this._uploads.expediteOperations();
|
||||
}
|
||||
|
||||
// forcibly stop operations that might otherwise retry indefinitely,
|
||||
// for testing purposes.
|
||||
public async testStopOperations() {
|
||||
this._uploads.stopOperations();
|
||||
await this._uploads.wait();
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalize any operations involving the named document.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user