Skip to content

Commit

Permalink
Mainly fixed wrong TCAP sequence in MAP stub for aut perf test: TC-BE…
Browse files Browse the repository at this point in the history
…G followed by TC-END for MAP ATI Req-Resp, thus closing dialog properly. Related to issues #23 and #86
  • Loading branch information
Fernando Mendioroz committed Sep 16, 2016
1 parent 412ce92 commit 72600c5
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
4 changes: 2 additions & 2 deletions test-suite/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
-->
<jvmarg value="-XX:+UseParallelOldGC"/>
<arg value="500000" /> <!-- number of Dialogs -->
<arg value="200" /> <!-- Concurrent Dialogs -->
<arg value="225" /> <!-- Concurrent Dialogs -->
<arg value="sctp" /> <!-- socket type -->
<arg value="127.0.0.1" /> <!-- Client IP -->
<arg value="2345" /> <!-- Client Port -->
Expand Down Expand Up @@ -191,7 +191,7 @@
-->
<jvmarg value="-XX:+UseParallelOldGC"/>
<arg value="100" /> <!-- number of Dialogs -->
<arg value="2" /> <!-- Concurrent Dialogs -->
<arg value="5" /> <!-- Concurrent Dialogs -->
<arg value="sctp" /> <!-- socket type -->
<arg value="127.0.0.1" /> <!-- Client IP -->
<arg value="2345" /> <!-- Client Port -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,6 @@ public void onAnyTimeInterrogationResponse(AnyTimeInterrogationResponse atiResp)
}
}

atiResp.getMAPDialog().close(true);

} catch (Exception e) {
logger.error(String.format("Error while processing onAnyTimeInterrogationResponse for Dialog=%d",
atiResp.getMAPDialog().getLocalDialogId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ public void onAnyTimeInterrogationRequest(AnyTimeInterrogationRequest atiReq) {
if (logger.isDebugEnabled()) {
logger.debug(
String.format("onAnyTimeInterrogationRequest for DialogId=%d", atiReq.getMAPDialog().getLocalDialogId()));
} else {
logger.info(
String.format("onAnyTimeInterrogationRequest for DialogId=%d", atiReq.getMAPDialog().getLocalDialogId()));
}

try {
Expand Down Expand Up @@ -634,8 +637,8 @@ public void onAnyTimeInterrogationRequest(AnyTimeInterrogationRequest atiReq) {

mapDialogMobility.addAnyTimeInterrogationResponse(invokeId, subscriberInfo, mapExtensionContainer);

// This will initiate the TC-BEGIN with INVOKE component
mapDialogMobility.send();
// This will close the TCAP dialog with TC-END initiated by TC-BEGIN with INVOKE component
mapDialogMobility.close(false);

} catch (MAPException mapException) {
logger.error("MAP Exception while processing AnyTimeInterrogationRequest ", mapException);
Expand All @@ -651,6 +654,9 @@ public void onAnyTimeInterrogationResponse(AnyTimeInterrogationResponse atiResp)
if (logger.isDebugEnabled()) {
logger.debug(String.format("onAnyTimeInterrogationResponse for DialogId=%d",
atiResp.getMAPDialog().getLocalDialogId()));
} else {
logger.info(String.format("onAnyTimeInterrogationResponse for DialogId=%d",
atiResp.getMAPDialog().getLocalDialogId()));
}

try {
Expand All @@ -675,6 +681,10 @@ public void onAnyTimeInterrogationResponse(AnyTimeInterrogationResponse atiResp)
logger.debug(String.format(
"Rx onAnyTimeInterrogationResponse: CI=%d, LAC=%d, MNC=%d, MCC=%d, for DialogId=%d",
cellId, lac, mnc, mcc, atiResp.getMAPDialog().getLocalDialogId()));
} else {
logger.info(String.format(
"Rx onAnyTimeInterrogationResponse: CI=%d, LAC=%d, MNC=%d, MCC=%d, for DialogId=%d",
cellId, lac, mnc, mcc, atiResp.getMAPDialog().getLocalDialogId()));
}
}
}
Expand All @@ -684,6 +694,9 @@ public void onAnyTimeInterrogationResponse(AnyTimeInterrogationResponse atiResp)
if (logger.isDebugEnabled()) {
logger.debug(String.format("Rx onAnyTimeInterrogationResponse: AoL=%d for DialogId=%d", aol,
atiResp.getMAPDialog().getLocalDialogId()));
} else {
logger.info(String.format("Rx onAnyTimeInterrogationResponse: AoL=%d for DialogId=%d", aol,
atiResp.getMAPDialog().getLocalDialogId()));
}
}

Expand All @@ -692,6 +705,9 @@ public void onAnyTimeInterrogationResponse(AnyTimeInterrogationResponse atiResp)
if (logger.isDebugEnabled()) {
logger.debug(String.format("Rx onAnyTimeInterrogationResponse: VLR address=%s for DialogId=%d",
vlrAddress, atiResp.getMAPDialog().getLocalDialogId()));
} else {
logger.info(String.format("Rx onAnyTimeInterrogationResponse: VLR address=%s for DialogId=%d",
vlrAddress, atiResp.getMAPDialog().getLocalDialogId()));
}
}
}
Expand All @@ -702,21 +718,30 @@ public void onAnyTimeInterrogationResponse(AnyTimeInterrogationResponse atiResp)
logger.debug(String.format("Rx onAnyTimeInterrogationResponse SubscriberState: "
+ si.getSubscriberState() + "for DialogId=%d", atiResp.getMAPDialog().getLocalDialogId()));
} else {
if (logger.isDebugEnabled()) {
logger.debug(String.format("Rx onAnyTimeInterrogationResponse, Bad Subscriber State received: " + si
+ "for DialogId=%d", atiResp.getMAPDialog().getLocalDialogId()));
}
logger.info(String.format("Rx onAnyTimeInterrogationResponse SubscriberState: "
+ si.getSubscriberState() + "for DialogId=%d", atiResp.getMAPDialog().getLocalDialogId()));
}
} else {
if (logger.isDebugEnabled()) {
logger.debug(String.format(
"Rx onAnyTimeInterrogationResponse, Bad Subscriber State received: " + si + "for DialogId=%d",
atiResp.getMAPDialog().getLocalDialogId()));
} else {
logger.info(String.format(
"Rx onAnyTimeInterrogationResponse, Bad Subscriber State received: " + si + "for DialogId=%d",
atiResp.getMAPDialog().getLocalDialogId()));
}
}
} else {
if (logger.isDebugEnabled()) {
logger.debug(String.format("Bad AnyTimeInterrogationResponse received: " + atiResp + "for DialogId=%d",
atiResp.getMAPDialog().getLocalDialogId()));
} else {
logger.info(String.format("Bad AnyTimeInterrogationResponse received: " + atiResp + "for DialogId=%d",
atiResp.getMAPDialog().getLocalDialogId()));
}
}

atiResp.getMAPDialog().close(true);

} catch (Exception e) {
logger.error(String.format("Error while processing onAnyTimeInterrogationResponse for Dialog=%d",
atiResp.getMAPDialog().getLocalDialogId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ public void onAnyTimeInterrogationRequest(AnyTimeInterrogationRequest atiReq) {
mapDialogMobility.addAnyTimeInterrogationResponse(invokeId, subscriberInfo, mapExtensionContainer);

// This will initiate the TC-BEGIN with INVOKE component
mapDialogMobility.send();
mapDialogMobility.close(false);

} catch (MAPException mapException) {
logger.error("MAP Exception while processing AnyTimeInterrogationRequest ", mapException);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public abstract class TestHarness implements MAPDialogListener, MAPServiceMobili

protected static int NDIALOGS = 50000;

protected static int MAXCONCURRENTDIALOGS = 200;
protected static int MAXCONCURRENTDIALOGS = 225;

// MTPL3 Details
protected static int CLIENT_SPC = 1; // Client Signaling Point Code
Expand Down

0 comments on commit 72600c5

Please sign in to comment.