[SEBA-905] Fix Assertions in Unit Test cases for authentication statistics
Change-Id: I6a4277492e424409b609fdbbadb284f1a13f3812
(cherry picked from commit 1bd890d550a107d53f58d99177966ce19196feb1)
diff --git a/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java b/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java
index 66e50f2..5c9f657 100644
--- a/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java
+++ b/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java
@@ -319,9 +319,15 @@
assertNotEquals(aaaStatisticsManager.getAaaStats().getEapolTransRespNotNak(), ZERO);
assertNotEquals(aaaStatisticsManager.getAaaStats().getEapPktTxauthChooseEap(), ZERO);
- // Counts the aaa Statistics count and displays in the log
- countAaaStatistics();
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getAcceptResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getAccessRequestsTx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getChallengeResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getDroppedResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getInvalidValidatorsRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getPendingRequests(), ZERO);
+ // Counts the aaa Statistics count and displays in the log
+ countAaaStatistics();
}
/** Tests the count for defected packets.
@@ -386,6 +392,15 @@
assertNotEquals(aaaStatisticsManager.getAaaStats().getEapPktTxauthChooseEap(), ZERO);
assertNotEquals(aaaStatisticsManager.getAaaStats().getEapolTransRespNotNak(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getAccessRequestsTx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getChallengeResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getDroppedResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getInvalidValidatorsRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getPendingRequests(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getRejectResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getRequestRttMilis(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getUnknownTypeRx(), ZERO);
+
// Counts the aaa Statistics count
countAaaStatistics();
@@ -430,9 +445,16 @@
assertNotEquals(aaaStatisticsManager.getAaaStats().getEapolResIdentityMsgTrans(), ZERO);
assertNotEquals(aaaStatisticsManager.getAaaStats().getEapolStartReqTrans(), ZERO);
- countAaaStatistics();
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getAccessRequestsTx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getDroppedResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getPendingRequests(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getMalformedResponsesRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getRequestReTx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getUnknownTypeRx(), ZERO);
+ assertNotEquals(aaaStatisticsManager.getAaaStats().getUnknownServerRx(), ZERO);
- }
+ countAaaStatistics();
+ }
/** Tests the authentication path through the AAA application.
* And counts the aaa Stats for logoff transactionXZ.