Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions Tests/UnitTests/Scripts/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,18 @@ if (hostPlatform !== "Unix") {
};
});

// TODO: This is not working reliably: see https://github.com/BabylonJS/JsRuntimeHost/issues/131
// it("should trigger error callback with invalid server", function (done) {
// const ws = new WebSocket("wss://caddddfd-ee88-4771-b293-8a8e13b330ee.com");
// ws.onerror = () => {
// done();
// };
// });
// Repro for https://github.com/BabylonJS/JsRuntimeHost/issues/131
// Issue reports ~1/3 flake rate. Running 20 iterations so that if the
// flake still exists, P(all pass) = (2/3)^20 ≈ 0.03%.
for (let i = 1; i <= 20; i++) {
it(`should trigger error callback with invalid server (iter ${i})`, function (done) {
this.timeout(15000);
const ws = new WebSocket("wss://caddddfd-ee88-4771-b293-8a8e13b330ee.com");
ws.onerror = () => {
done();
};
});
}

it("should trigger error callback with invalid domain", function (done) {
this.timeout(10000);
Expand Down
Loading