mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-03 22:33:07 +00:00
* chore: add throughput reliability tests * chore: add capability to run all * chore: add network-latency reliability tests * chore: add network-latency reliability tests * chore: add other network reliability tests * chore: add other network reliability tests * chore: fix tc cleanup * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: fix * chore: fix tests * chore: fix tests
25 lines
646 B
TypeScript
25 lines
646 B
TypeScript
import { execCommand, runTest, setupTest } from "./sharedTestUtils.js";
|
|
|
|
describe("Packet Loss Test", function () {
|
|
const testDurationMs = 10 * 60 * 1000; // 10 mins
|
|
const testContext = {};
|
|
|
|
setupTest(this, testContext);
|
|
|
|
beforeEach(async () => {
|
|
execCommand("sudo tc qdisc add dev eth0 root netem loss 2%");
|
|
});
|
|
|
|
afterEach(async () => {
|
|
execCommand("sudo tc qdisc del dev eth0 root netem");
|
|
});
|
|
|
|
runTest({
|
|
testContext: testContext,
|
|
testDurationMs: testDurationMs,
|
|
testName: "Packet Loss Test",
|
|
messageGenerator: (messageId: number) => `Packet-Loss-${messageId}`,
|
|
delayBetweenMessagesMs: 400
|
|
});
|
|
});
|