Skip to content

Commit

Permalink
Merge pull request #83 from uber/nond2
Browse files Browse the repository at this point in the history
Addition of replay test and json for continue as new
  • Loading branch information
abhishekj720 authored May 21, 2024
2 parents 50c6793 + 680fdce commit 2bce1c5
Show file tree
Hide file tree
Showing 3 changed files with 1,555 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
* permissions and limitations under the License.
*/

package com.uber.cadence.samples.hello;
package com.uber.cadence.samples.replaytests;

import com.uber.cadence.samples.hello.HelloActivity;
import com.uber.cadence.samples.hello.HelloPeriodic;
import com.uber.cadence.testing.WorkflowReplayer;
import org.junit.Test;

Expand All @@ -28,9 +30,19 @@
// Or from Cadence Web UI. (You may need to put history file in resources folder; and change
// workflowType in the first event of history).
public class HelloActivityReplayTest {

// simple replayer test which checks the current workflow execution with the definition: should
// pass
@Test
public void testReplay() throws Exception {
WorkflowReplayer.replayWorkflowExecutionFromResource(
"HelloActivity.json", HelloActivity.GreetingWorkflowImpl.class);
"replaytests/HelloActivity.json", HelloActivity.GreetingWorkflowImpl.class);
}

// continue-as-new case for replayer tests
@Test
public void testReplay_continueAsNew() throws Exception {
WorkflowReplayer.replayWorkflowExecutionFromResource(
"replaytests/HelloPeriodic.json", HelloPeriodic.GreetingWorkflowImpl.class);
}
}
File renamed without changes.
Loading

0 comments on commit 2bce1c5

Please sign in to comment.