Created
May 5, 2025 19:56
-
-
Save btoconnor/f165294078802f0e6217db203dfdd17b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/service/src/test/kotlin/com/squareup/cash/issuingdisputesservice/workflows/MerchantResolutionWorkflowTest.kt b/service/src/test/kotlin/com/squareup/cash/issuingdisputesservice/workflows/MerchantResolutionWorkflowTest.kt | |
index 0de7f780..70df7044 100644 | |
--- a/service/src/test/kotlin/com/squareup/cash/issuingdisputesservice/workflows/MerchantResolutionWorkflowTest.kt | |
+++ b/service/src/test/kotlin/com/squareup/cash/issuingdisputesservice/workflows/MerchantResolutionWorkflowTest.kt | |
@@ -191,31 +191,31 @@ class MerchantResolutionWorkflowTest : BaseDisputeTest() { | |
cwf.workflowStub.resolveDisputeWithMerchant( | |
MerchantResolutionWorkflowInput( | |
requestToken = requestToken, | |
disputeCaseToken = disputeCaseToken, | |
amount = Money.ofUsd(1000), | |
reason = "testing", | |
triggeredBy = TriggeredBy.PRODUCT_CASH, | |
deployment = deployment | |
) | |
) | |
} | |
throw AssertionError("Expected exception") | |
} catch (e: Exception) { | |
// validate that the workflow is paused, so the exception is a timeout exception | |
- assertThat(e.message.toString()).contains("EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT") | |
+ assertThat(e.message.toString()).contains("EVENT_TYPE_WORKFLOW_EXECUTION_FAILED") | |
} | |
} | |
// This is a helper function to create the test history for the merchant resolution workflow | |
// When we need to update the workflow history file add this to the end of the happy path test: | |
// createDeterminismTest("merchant_resolution_open_case", workflowId.value) | |
private fun createDeterminismTest(fileName: String, workflowId: String) { | |
val testEnv = workflowManager.getTestEnv(merchantResolutionWorkflowConfig) | |
val request: GetWorkflowExecutionHistoryRequest = | |
GetWorkflowExecutionHistoryRequest.newBuilder() | |
.setNamespace(testEnv.namespace) | |
.setExecution( | |
WorkflowExecution.newBuilder() | |
.setWorkflowId(workflowId) | |
.build() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment