mirror of https://github.com/dapr/java-sdk.git
reset unintended changes
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
This commit is contained in:
parent
e9455acc90
commit
13a0891add
|
@ -15,7 +15,6 @@ package io.dapr.it.testcontainers;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import io.dapr.testcontainers.Component;
|
import io.dapr.testcontainers.Component;
|
||||||
import io.dapr.testcontainers.DaprContainer;
|
import io.dapr.testcontainers.DaprContainer;
|
||||||
import io.dapr.testcontainers.DaprLogLevel;
|
import io.dapr.testcontainers.DaprLogLevel;
|
||||||
|
@ -41,7 +40,6 @@ import java.util.Collections;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static io.dapr.it.testcontainers.ContainerConstants.DAPR_RUNTIME_IMAGE_TAG;
|
import static io.dapr.it.testcontainers.ContainerConstants.DAPR_RUNTIME_IMAGE_TAG;
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
|
||||||
|
@ -119,29 +117,6 @@ public class DaprWorkflowsIT {
|
||||||
assertEquals(instanceId, workflowOutput.getWorkflowId());
|
assertEquals(instanceId, workflowOutput.getWorkflowId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testExecutionKeyWorkflows() throws Exception {
|
|
||||||
TestWorkflowPayload payload = new TestWorkflowPayload(new ArrayList<>());
|
|
||||||
String instanceId = workflowClient.scheduleNewWorkflow(TestExecutionKeysWorkflow.class, payload);
|
|
||||||
|
|
||||||
workflowClient.waitForInstanceStart(instanceId, Duration.ofSeconds(100), false);
|
|
||||||
|
|
||||||
Duration timeout = Duration.ofSeconds(1000);
|
|
||||||
WorkflowInstanceStatus workflowStatus = workflowClient.waitForInstanceCompletion(instanceId, timeout, true);
|
|
||||||
|
|
||||||
assertNotNull(workflowStatus);
|
|
||||||
|
|
||||||
TestWorkflowPayload workflowOutput = deserialize(workflowStatus.getSerializedOutput());
|
|
||||||
|
|
||||||
assertEquals(1, workflowOutput.getPayloads().size());
|
|
||||||
assertEquals("Execution key found", workflowOutput.getPayloads().get(0));
|
|
||||||
|
|
||||||
String executionKey = workflowOutput.getWorkflowId() +"-"+"io.dapr.it.testcontainers.TaskExecutionKeyActivity";
|
|
||||||
assertTrue(KeyStore.getInstance().getKey(executionKey));
|
|
||||||
|
|
||||||
assertEquals(instanceId, workflowOutput.getWorkflowId());
|
|
||||||
}
|
|
||||||
|
|
||||||
private TestWorkflowPayload deserialize(String value) throws JsonProcessingException {
|
private TestWorkflowPayload deserialize(String value) throws JsonProcessingException {
|
||||||
return OBJECT_MAPPER.readValue(value, TestWorkflowPayload.class);
|
return OBJECT_MAPPER.readValue(value, TestWorkflowPayload.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,12 +56,9 @@ public class TestDaprWorkflowsConfiguration {
|
||||||
WorkflowRuntimeBuilder builder = new WorkflowRuntimeBuilder(new Properties(overrides));
|
WorkflowRuntimeBuilder builder = new WorkflowRuntimeBuilder(new Properties(overrides));
|
||||||
|
|
||||||
builder.registerWorkflow(TestWorkflow.class);
|
builder.registerWorkflow(TestWorkflow.class);
|
||||||
builder.registerWorkflow(TestExecutionKeysWorkflow.class);
|
|
||||||
builder.registerActivity(FirstActivity.class);
|
builder.registerActivity(FirstActivity.class);
|
||||||
builder.registerActivity(SecondActivity.class);
|
builder.registerActivity(SecondActivity.class);
|
||||||
builder.registerActivity(TaskExecutionKeyActivity.class);
|
|
||||||
|
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue