Skip to content

Commit 908aa38

Browse files
committed
Make reproducer for original issue check that it still throws the same
exception.
1 parent 3154a78 commit 908aa38

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

temporal-sdk/src/test/java/io/temporal/workflow/versionTests/GetVersionInterleavedUpdateReplayTest.java

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.temporal.workflow.versionTests;
22

33
import static org.junit.Assert.assertEquals;
4+
import static org.junit.Assert.assertThrows;
45
import static org.junit.Assert.assertTrue;
56

67
import io.temporal.activity.ActivityInterface;
@@ -32,7 +33,6 @@
3233
import java.util.Collections;
3334
import java.util.List;
3435
import java.util.UUID;
35-
import org.junit.Ignore;
3636
import org.junit.Test;
3737
import org.slf4j.Logger;
3838

@@ -52,18 +52,26 @@ public class GetVersionInterleavedUpdateReplayTest {
5252
* This recorded history predates {@link SdkFlag#SKIP_YIELD_ON_VERSION}, so it no longer matches
5353
* the histories produced by the current branch.
5454
*
55-
* <p>We keep the fixture around for reference, but do not execute it as part of the suite. Making
56-
* this exact history replay again would require changing replay behavior for histories that did
57-
* not record the newer flags, which may break other existing replays. The fix is to put the
58-
* state-machine behavior change behind an SDK flag {@link SdkFlag#VERSION_WAIT_FOR_MARKER}, and
59-
* to make sure new workflows run with {@link SdkFlag#SKIP_YIELD_ON_VERSION} by default to avoid
60-
* interleaved histories.
55+
* <p>Keep this fixture as a reproducer that old histories without the newer flags still preserve
56+
* the old failure. Making this exact history replay again would require changing replay behavior
57+
* for histories that did not record the newer flags, which may break other existing replays. The
58+
* fix is to put the state-machine behavior change behind an SDK flag {@link
59+
* SdkFlag#VERSION_WAIT_FOR_MARKER}, and to make sure new workflows run with {@link
60+
* SdkFlag#SKIP_YIELD_ON_VERSION} by default to avoid interleaved histories.
6161
*/
62-
@Ignore("Recorded history predates SKIP_YIELD_ON_VERSION. Use the live-history replay test.")
6362
@Test
64-
public void testReplayHistory() throws Exception {
65-
WorkflowReplayer.replayWorkflowExecutionFromResource(
66-
HISTORY_RESOURCE, GreetingWorkflowImpl.class);
63+
public void testReplayHistoryWithoutFlagStillFails() {
64+
RuntimeException replayFailure =
65+
assertThrows(
66+
RuntimeException.class,
67+
() ->
68+
WorkflowReplayer.replayWorkflowExecutionFromResource(
69+
HISTORY_RESOURCE, GreetingWorkflowImpl.class));
70+
71+
assertTrue(
72+
replayFailure
73+
.getMessage()
74+
.contains("[TMPRL1100] getVersion call before the existing version marker event"));
6775
}
6876

6977
@Test

0 commit comments

Comments
 (0)