Search in sources :

Example 1 with TestStatsReporter

use of io.temporal.common.reporter.TestStatsReporter in project sdk-java by temporalio.

the class ReplayWorkflowRunTaskHandlerCacheTests method setUp.

@Before
public void setUp() {
    reporter = new TestStatsReporter();
    metricsScope = new RootScopeBuilder().reporter(reporter).reportEvery(Duration.ofMillis(10));
}
Also used : RootScopeBuilder(com.uber.m3.tally.RootScopeBuilder) TestStatsReporter(io.temporal.common.reporter.TestStatsReporter) Before(org.junit.Before)

Example 2 with TestStatsReporter

use of io.temporal.common.reporter.TestStatsReporter in project sdk-java by temporalio.

the class StickyWorkerTest method setUp.

// TODO(maxim): refactor all of this ugliness into a service based implementation of
// TestWorkflowEnvironment
@Before
public void setUp() {
    reporter = new TestStatsReporter();
    metricsScope = new RootScopeBuilder().reporter(reporter).reportEvery(com.uber.m3.util.Duration.ofSeconds(10));
}
Also used : RootScopeBuilder(com.uber.m3.tally.RootScopeBuilder) TestStatsReporter(io.temporal.common.reporter.TestStatsReporter) Before(org.junit.Before)

Example 3 with TestStatsReporter

use of io.temporal.common.reporter.TestStatsReporter in project sdk-java by temporalio.

the class MetricsTest method setUp.

public void setUp(WorkerFactoryOptions workerFactoryOptions) {
    Scope metricsScope;
    reporter = new TestStatsReporter();
    metricsScope = new RootScopeBuilder().reporter(reporter).reportEvery(com.uber.m3.util.Duration.ofMillis(10));
    TestEnvironmentOptions testOptions = TestEnvironmentOptions.newBuilder().setMetricsScope(metricsScope).setWorkflowClientOptions(WorkflowClientOptions.newBuilder().setNamespace(NAMESPACE).build()).setWorkerFactoryOptions(workerFactoryOptions).build();
    testEnvironment = TestWorkflowEnvironment.newInstance(testOptions);
}
Also used : TestEnvironmentOptions(io.temporal.testing.TestEnvironmentOptions) RootScopeBuilder(com.uber.m3.tally.RootScopeBuilder) Scope(com.uber.m3.tally.Scope) TestStatsReporter(io.temporal.common.reporter.TestStatsReporter)

Aggregations

RootScopeBuilder (com.uber.m3.tally.RootScopeBuilder)3 TestStatsReporter (io.temporal.common.reporter.TestStatsReporter)3 Before (org.junit.Before)2 Scope (com.uber.m3.tally.Scope)1 TestEnvironmentOptions (io.temporal.testing.TestEnvironmentOptions)1