Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of replay test and json for continue as new #83

Merged
merged 3 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
Loading
Loading