Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save btoconnor/f165294078802f0e6217db203dfdd17b to your computer and use it in GitHub Desktop.
Save btoconnor/f165294078802f0e6217db203dfdd17b to your computer and use it in GitHub Desktop.
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