Expect the longer storage retries in the web storage test
The web build now retries a vanished file up to eight times; the pre-push check runs this test whenever the web boot code changes.
This commit is contained in:
1 parent
3220589102
commit
5fc49412a0
2 files changed
+3
-1
No files matched your search
@@ -68,6 +68,8 @@ def plan(files):
|
||||
python = [path for path in files if path.endswith(".py") and (ROOT / path).is_file()]
|
||||
if python:
|
||||
checks.append(("Python syntax", ["python3", "-m", "py_compile", *python]))
|
||||
if any_of("src/web_boot.js", "tests/web_storage_test.mjs"):
|
||||
checks.append(("web storage", ["node", "tests/web_storage_test.mjs"]))
|
||||
scripts = [path for path in files if path.endswith((".js", ".mjs")) and (ROOT / path).is_file()]
|
||||
for path in scripts:
|
||||
checks.append((path + " syntax", ["node", "--check", path]))
|
||||
|
||||
@@ -62,7 +62,7 @@ let attempts = 0;
|
||||
let storeUnavailable = true;
|
||||
const unavailable = boot((populate, done) => { attempts++; done(storeUnavailable ? { name: 'AbortError' } : null); });
|
||||
assert.equal(await unavailable.__inbeFlushStorageSync(false), false);
|
||||
assert.equal(attempts, 4, 'transient storage retries must be bounded');
|
||||
assert.equal(attempts, 9, 'transient storage retries must be bounded');
|
||||
assert.equal(unavailable.__inbeStorageSyncPending, true, 'failed writes remain dirty');
|
||||
assert.equal(unavailable.__inbeStorageSyncing, false);
|
||||
assert.equal(unavailable.__inbeStorageSyncTimer, 0);
|
||||
|
||||
Reference in new issue
Block a user