reset unintended changes

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
This commit is contained in:
Cassandra Coyle 2025-05-29 13:36:57 -05:00
parent e9455acc90
commit 13a0891add
No known key found for this signature in database
2 changed files with 1 additions and 29 deletions

View File

@ -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);
} }

View File

@ -56,11 +56,8 @@ 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;
} }