js-waku/packages/reliability-tests/tests/network-latency.spec.ts
fbarbu15 c1f9471cd7
chore: extra reliability tests 2 (#2450)
* 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
2025-07-29 10:17:43 +03:00

27 lines
721 B
TypeScript

import { execCommand, runTest, setupTest } from "./sharedTestUtils.js";
describe("Network Latency and Jitter 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 delay 300ms 50ms distribution normal"
);
});
afterEach(async () => {
execCommand("sudo tc qdisc del dev eth0 root netem");
});
runTest({
testContext: testContext,
testDurationMs: testDurationMs,
testName: "Network Latency and Jitter Test",
messageGenerator: (messageId: number) => `Network-Latency-${messageId}`,
delayBetweenMessagesMs: 400
});
});