(
method: "Ping" | "Events",
options: { spanPrefix?: string; spanAttributes?: Record<string, unknown> } = {}
)
| 1686 | const SpanGroup = TestGroup.prefix("Echo.") |
| 1687 | |
| 1688 | const call = ( |
| 1689 | method: "Ping" | "Events", |
| 1690 | options: { spanPrefix?: string; spanAttributes?: Record<string, unknown> } = {} |
| 1691 | ) => |
| 1692 | withCapturedSpans((spans) => |
| 1693 | Effect.gen(function*() { |
| 1694 | const client = yield* RpcTest.makeClient(SpanGroup, options) |
| 1695 | yield* method === "Ping" ? client["Echo.Ping"]() : Stream.runDrain(client["Echo.Events"]()) |
| 1696 | return spans |
| 1697 | }).pipe( |
| 1698 | Effect.provide(SpanGroup.toLayer({ |
| 1699 | "Echo.Ping": () => Effect.succeed("pong"), |
| 1700 | "Echo.Events": () => Stream.make("event") |
| 1701 | })) |
| 1702 | ) |
| 1703 | ) |
| 1704 | |
| 1705 | it.effect("records RPC span defaults for streaming calls", () => |
| 1706 | Effect.gen(function*() { |
no test coverage detected