Skip to content
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 @@ -12,15 +12,14 @@
import io.dapr.it.BaseIT;
import io.dapr.it.DaprRun;
import io.dapr.it.actors.app.MyActorService;
import io.dapr.it.state.GRPCStateClientIT;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
Expand Down Expand Up @@ -98,12 +97,18 @@ public void reminderRecoveryTest() throws Exception {
// Restarts runtime only.
logger.info("Stopping Dapr sidecar");
runs.right.stop();

// Pause a bit to let placements settle.
logger.info("Pausing 10 seconds to let placements settle.");
Thread.sleep(Duration.ofSeconds(10).toMillis());

logger.info("Starting Dapr sidecar");
runs.right.start();
logger.info("Dapr sidecar started");

logger.info("Pausing 7 seconds to allow sidecar to be healthy");
Thread.sleep(7000);

callWithRetry(() -> {
logger.info("Fetching logs for " + METHOD_NAME);
List<MethodEntryTracker> newLogs = fetchMethodCallLogs(proxy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import static io.dapr.it.Retry.callWithRetry;
import static io.dapr.it.actors.MyActorTestUtils.fetchMethodCallLogs;
import static io.dapr.it.actors.MyActorTestUtils.validateMethodCalls;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;

public class ActorTimerRecoveryIT extends BaseIT {
Expand Down Expand Up @@ -72,6 +72,11 @@ public void timerRecoveryTest() throws Exception {

// Restarts app only.
runs.left.stop();

// Pause a bit to let placements settle.
logger.info("Pausing 10 seconds to let placements settle.");
Thread.sleep(Duration.ofSeconds(10).toMillis());

runs.left.start();

logger.debug("Pausing 10 seconds to allow timer to fire");
Expand Down