11package io .temporal .workflow .versionTests ;
22
33import static org .junit .Assert .assertEquals ;
4+ import static org .junit .Assert .assertThrows ;
45import static org .junit .Assert .assertTrue ;
56
67import io .temporal .activity .ActivityInterface ;
3233import java .util .Collections ;
3334import java .util .List ;
3435import java .util .UUID ;
35- import org .junit .Ignore ;
3636import org .junit .Test ;
3737import 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