Skip to content

Commit

Permalink
remove handling timeout action value "never"
Browse files Browse the repository at this point in the history
  • Loading branch information
chathuranga-jayanath-99 committed Nov 26, 2024
1 parent 5d0d62f commit 1b00df2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ public class EPConstants {

public static final String DISCARD = "discard";
public static final String FAULT = "fault";
public static final String NEVER = "never";
}
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,6 @@ public int evaluateDynamicTimeoutAction(MessageContext synCtx) {
result = SynapseConstants.DISCARD;
} else if (EPConstants.FAULT.equalsIgnoreCase(timeoutActionStr)) {
result = SynapseConstants.DISCARD_AND_FAULT;
} else if (EPConstants.NEVER.equalsIgnoreCase(timeoutActionStr)) {
result = SynapseConstants.NONE;
}
}
} catch (NumberFormatException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,6 @@ public void testContextPropertiesForNoTimeoutAction() throws Exception {
assertEquals(endpoint.getDefinition().getResolvedTimeoutAction(synCtx), SynapseConstants.NONE);
}

public void testContextPropertiesForTimeoutActionNever() throws Exception {

SynapseXPath xpath = new SynapseXPath("$ctx:timeoutAction");
AbstractEndpoint endpoint = new AddressEndpoint();
EndpointDefinition definition = new EndpointDefinition();
endpoint.setDefinition(definition);
definition.setDynamicTimeoutAction(xpath);
MessageContext synCtx = new TestMessageContext();
synCtx.setProperty("timeoutAction", "never");
assertEquals(endpoint.getDefinition().getResolvedTimeoutAction(synCtx), SynapseConstants.NONE);
}

public void testContextPropertiesForSuspendErrorCodes() throws Exception {

SynapseXPath xpath = new SynapseXPath("$ctx:suspendErrorCodes");
Expand Down

0 comments on commit 1b00df2

Please sign in to comment.