Search in sources :

Example 1 with NoArgsWorkflow

use of io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow in project sdk-java by temporalio.

the class GetVersionAddNewBeforeTest method testGetVersionAddNewBefore.

@Test
public void testGetVersionAddNewBefore() {
    assumeFalse("skipping for docker tests", SDKTestWorkflowRule.useExternalService);
    NoArgsWorkflow workflowStub = testWorkflowRule.newWorkflowStubTimeoutOptions(NoArgsWorkflow.class);
    workflowStub.execute();
    assertEquals(1, versionFoo);
    assertEquals(Workflow.DEFAULT_VERSION, versionBar);
}
Also used : NoArgsWorkflow(io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow) Test(org.junit.Test)

Example 2 with NoArgsWorkflow

use of io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow in project sdk-java by temporalio.

the class GetVersionSameIdTest method testGetVersionSameId.

@Test
public void testGetVersionSameId() {
    assumeFalse("skipping for docker tests", SDKTestWorkflowRule.useExternalService);
    NoArgsWorkflow workflowStub = testWorkflowRule.newWorkflowStubTimeoutOptions(NoArgsWorkflow.class);
    workflowStub.execute();
    assertTrue(hasReplayed);
}
Also used : NoArgsWorkflow(io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow) Test(org.junit.Test)

Example 3 with NoArgsWorkflow

use of io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow in project sdk-java by temporalio.

the class GetVersionWorkflowReplaceCompletelyTest method testGetVersionWorkflowReplaceCompletely.

@Test
public void testGetVersionWorkflowReplaceCompletely() {
    assumeFalse("skipping for docker tests", SDKTestWorkflowRule.useExternalService);
    NoArgsWorkflow workflowStub = testWorkflowRule.newWorkflowStubTimeoutOptions(NoArgsWorkflow.class);
    workflowStub.execute();
    assertTrue(hasReplayed);
}
Also used : NoArgsWorkflow(io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow) Test(org.junit.Test)

Example 4 with NoArgsWorkflow

use of io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow in project sdk-java by temporalio.

the class GetVersionWorkflowReplaceGetVersionIdTest method testGetVersionWorkflowReplaceGetVersionId.

@Test
public void testGetVersionWorkflowReplaceGetVersionId() {
    assumeFalse("skipping for docker tests", SDKTestWorkflowRule.useExternalService);
    NoArgsWorkflow workflowStub = testWorkflowRule.newWorkflowStubTimeoutOptions(NoArgsWorkflow.class);
    workflowStub.execute();
    assertTrue(hasReplayed);
}
Also used : NoArgsWorkflow(io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow) Test(org.junit.Test)

Example 5 with NoArgsWorkflow

use of io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow in project sdk-java by temporalio.

the class ProhibitedCallsFromWorkflowTest method testWorkflowClientCallFromWorkflow.

@Test
public void testWorkflowClientCallFromWorkflow() {
    NoArgsWorkflow client = testWorkflowRule.newWorkflowStubTimeoutOptions(NoArgsWorkflow.class);
    client.execute();
}
Also used : NoArgsWorkflow(io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow) Test(org.junit.Test)

Aggregations

NoArgsWorkflow (io.temporal.workflow.shared.TestWorkflows.NoArgsWorkflow)16 Test (org.junit.Test)16 WorkflowOptions (io.temporal.client.WorkflowOptions)6 WorkflowClient (io.temporal.client.WorkflowClient)4 Worker (io.temporal.worker.Worker)4 WorkflowServiceException (io.temporal.client.WorkflowServiceException)3 ImmutableMap (com.uber.m3.util.ImmutableMap)2 StatusRuntimeException (io.grpc.StatusRuntimeException)2 TestWorkflowReturnString (io.temporal.workflow.shared.TestWorkflows.TestWorkflowReturnString)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 RootScopeBuilder (com.uber.m3.tally.RootScopeBuilder)1 WorkflowExecution (io.temporal.api.common.v1.WorkflowExecution)1 ActivityInboundCallsInterceptor (io.temporal.common.interceptors.ActivityInboundCallsInterceptor)1 WorkerInterceptor (io.temporal.common.interceptors.WorkerInterceptor)1 WorkflowInboundCallsInterceptor (io.temporal.common.interceptors.WorkflowInboundCallsInterceptor)1 TestActivitiesImpl (io.temporal.workflow.shared.TestActivities.TestActivitiesImpl)1 LinkedHashMap (java.util.LinkedHashMap)1