Skip to content

Commit

Permalink
APPNG-2479
Browse files Browse the repository at this point in the history
  • Loading branch information
madness-inc committed May 4, 2023
1 parent f0e090f commit 7df8ec4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import javax.servlet.http.HttpServletResponse;

import org.appng.api.Path;
import org.appng.api.Platform;
import org.appng.api.Scope;
import org.appng.api.SiteProperties;
import org.appng.api.messaging.Messaging;
Expand Down Expand Up @@ -115,6 +116,9 @@ public void testExternalRedirect() {
public void testSetSiteState() {
Mockito.when(environment.getAttribute(Scope.PLATFORM, NodeEvent.NODE_STATE))
.thenReturn(new HashMap<String, NodeState>());
Properties platformCfg = Mockito.mock(Properties.class);
Mockito.when(environment.getAttribute(Scope.PLATFORM, Platform.Environment.PLATFORM_CONFIG)).thenReturn(platformCfg);
Mockito.when(platformCfg.getInteger("setSiteStateStartedDelay", 10)).thenReturn(10);
String nodeId = Messaging.getNodeId();
NodeState nodeState = NodeEvent.clusterState(environment, nodeId).get(nodeId);
Map<String, SiteState> stateMap = nodeState.getSiteStates();
Expand Down

0 comments on commit 7df8ec4

Please sign in to comment.