Search in sources :

Example 1 with FakeStatsContextFactory

use of io.grpc.internal.testing.StatsTestUtils.FakeStatsContextFactory in project grpc-java by grpc.

the class MessageFramerTest method setUp.

/** Set up for test. */
@Before
public void setUp() {
    MockitoAnnotations.initMocks(this);
    statsCtxFactory = new FakeStatsContextFactory();
    // MessageDeframerTest tests with a client-side StatsTraceContext, so here we test with a
    // server-side StatsTraceContext.
    statsTraceCtx = StatsTraceContext.newServerContext("service/method", statsCtxFactory, new Metadata(), GrpcUtil.STOPWATCH_SUPPLIER);
    framer = new MessageFramer(sink, allocator, statsTraceCtx);
}
Also used : FakeStatsContextFactory(io.grpc.internal.testing.StatsTestUtils.FakeStatsContextFactory) Metadata(io.grpc.Metadata) Before(org.junit.Before)

Aggregations

Metadata (io.grpc.Metadata)1 FakeStatsContextFactory (io.grpc.internal.testing.StatsTestUtils.FakeStatsContextFactory)1 Before (org.junit.Before)1