Skip to content

Commit 2bce1c5

Browse files
authored
Merge pull request #83 from uber/nond2
Addition of replay test and json for continue as new
2 parents 50c6793 + 680fdce commit 2bce1c5

File tree

3 files changed

+1555
-2
lines changed

3 files changed

+1555
-2
lines changed

src/test/java/com/uber/cadence/samples/hello/HelloActivityReplayTest.java renamed to src/test/java/com/uber/cadence/samples/replaytests/HelloActivityReplayTest.java

+14-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
* permissions and limitations under the License.
1616
*/
1717

18-
package com.uber.cadence.samples.hello;
18+
package com.uber.cadence.samples.replaytests;
1919

20+
import com.uber.cadence.samples.hello.HelloActivity;
21+
import com.uber.cadence.samples.hello.HelloPeriodic;
2022
import com.uber.cadence.testing.WorkflowReplayer;
2123
import org.junit.Test;
2224

@@ -28,9 +30,19 @@
2830
// Or from Cadence Web UI. (You may need to put history file in resources folder; and change
2931
// workflowType in the first event of history).
3032
public class HelloActivityReplayTest {
33+
34+
// simple replayer test which checks the current workflow execution with the definition: should
35+
// pass
3136
@Test
3237
public void testReplay() throws Exception {
3338
WorkflowReplayer.replayWorkflowExecutionFromResource(
34-
"HelloActivity.json", HelloActivity.GreetingWorkflowImpl.class);
39+
"replaytests/HelloActivity.json", HelloActivity.GreetingWorkflowImpl.class);
40+
}
41+
42+
// continue-as-new case for replayer tests
43+
@Test
44+
public void testReplay_continueAsNew() throws Exception {
45+
WorkflowReplayer.replayWorkflowExecutionFromResource(
46+
"replaytests/HelloPeriodic.json", HelloPeriodic.GreetingWorkflowImpl.class);
3547
}
3648
}

0 commit comments

Comments
 (0)