openvibers/openvibe.media Commits

Make the drill test's corrupt B2 copy always differ from the original

OP OpenVibers committed 2 Oct 2026 · 3995ddca29 · 1 file, +1 −1

Requested by finish-f2. Handed to the local harness by the cloud job pr-OpenVibe.Media-8; done by Claude opus.

Changes

ddiff --git a/test/r2-eviction-drill.test.js b/test/r2-eviction-drill.test.js
iindex c73bad4..a400d2c 100644
---- a/test/r2-eviction-drill.test.js
++++ b/test/r2-eviction-drill.test.js
@@@ -129,7 +129,7 @@ const crypto = require('crypto');
const key2 = await addVod(2);
buckets['b2-bucket'].set(key2, bytes.subarray(0, 100));
assert.match((await runDrill(opts({ vodId: 2, execute: true }), deps)).reason, /differ in size/);
-- buckets['b2-bucket'].set(key2, Buffer.concat([Buffer.from('X'), bytes.subarray(1)]));
++ buckets['b2-bucket'].set(key2, Buffer.concat([Buffer.from([bytes[0] ^ 0xff]), bytes.subarray(1)])); // always differs (a fixed 'X' matched random bytes 1 run in 256)
assert.match((await runDrill(opts({ vodId: 2, execute: true }), deps)).reason, /first MiB/);
buckets['b2-bucket'].delete(key2);
assert.match((await runDrill(opts({ vodId: 2, execute: true }), deps)).reason, /B2 canonical copy is missing/);