Skip to content

Commit

Permalink
fix: use yamux
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-pousette committed Oct 28, 2023
1 parent f69c01a commit 8dd2dac
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { webSockets } from "@libp2p/websockets";
import { circuitRelayServer } from "libp2p/circuit-relay";
import { delay, waitForResolved } from "@peerbit/time";
import { noise } from "@dao-xyz/libp2p-noise";
import { mplex } from "@libp2p/mplex";
import { yamux } from "@chainsafe/libp2p-yamux";
import { identifyService } from "libp2p/identify";
import { all } from "@libp2p/websockets/filters";
import { TestDirectStream } from "../shared/utils";
Expand All @@ -26,7 +26,7 @@ test.describe("stream", () => {
stream: (c) => new TestDirectStream(c)
},
transports: [webSockets({ filter: all })],
streamMuxers: [mplex()],
streamMuxers: [yamux()],
connectionEncryption: [noise()]
});
});
Expand Down Expand Up @@ -55,12 +55,12 @@ test.describe("stream", () => {

await waitForResolved(async () => {
const counter = await page.getByTestId("peer-counter");
await expect(counter).toHaveText(String(1), { timeout: 15e3 });
await expect(counter).toHaveText(String(2), { timeout: 15e3 });
});

await waitForResolved(async () => {
const counter = await anotherPage.getByTestId("peer-counter");
await expect(counter).toHaveText(String(1), { timeout: 15e3 });
await expect(counter).toHaveText(String(2), { timeout: 15e3 });
});

// Shut down the relay to make sure traffic works over webrtc
Expand Down

0 comments on commit 8dd2dac

Please sign in to comment.