mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-03 09:33:47 +01:00
test: update tests left stale by logging and metadata changes
- large-repository-tree: queued jobs now carry a logJobId trace id (structured logging); assert it instead of an exact job payload. - repository-activity: FileModel.exists() is chained with .hint() since #951; stub it with a query-like object. - performance-integration: staged markers are cleared through File.collection.updateMany since #951, so the old Model.updateMany stub never injected the interruption. - performance-worker: workers report fixed codes only, so a regex timeout surfaces as anonymization_deadline_exceeded; the elapsed bound still proves the 1s regex deadline applied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
23384dad92
commit
7bc4475b02
4 files changed
+16
-9
No files matched your search
@@ -88,7 +88,9 @@ describe("large anonymization resources", function () {
|
||||
maxOutput: 1000000, context: { mask: "XXXX", hostname: "localhost" } }, text.length, controller.signal);
|
||||
} catch (error) { failure = error; }
|
||||
expect(failure).to.be.instanceOf(Error);
|
||||
expect(failure.message).to.match(/timed out after 1000ms/);
|
||||
// Workers report fixed codes only; the elapsed bound proves the 1s regex deadline,
|
||||
// not the 15s pool deadline that reports the same code, stopped the job.
|
||||
expect(failure.message).to.equal("anonymization_deadline_exceeded");
|
||||
expect(Date.now() - started).to.be.lessThan(8000);
|
||||
let exists = true;
|
||||
try { await fs.access(output); } catch (error) { if (error.code === "ENOENT") exists = false; else throw error; }
|
||||
|
||||
Reference in new issue
Block a user