Skip to content

Commit

Permalink
Fix unit test case failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiyamSanthosh committed Jun 6, 2024
1 parent 5e00294 commit 92db6fe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,15 @@ public void testStoreUserSessionData(String userId, String sessionId) throws Exc
}

@Test(dataProvider = "getDuplicatedSessionsForUsers", dependsOnMethods = {"testStoreUserSessionData"},
expectedExceptions = UserSessionException.class)
expectedExceptions = {UserSessionException.class, DuplicatedAuthUserException.class})
public void testExceptionAtStoreUserSessionDataForDuplicatedSession(String userId, String sessionId) throws
Exception {

try (Connection connection = getConnection(DB_NAME);
Connection connection1 = getConnection(DB_NAME);
MockedStatic<IdentityDatabaseUtil> identityDatabaseUtil = mockStatic(IdentityDatabaseUtil.class)) {
mockIdentityDataBaseUtilConnection(connection, true, identityDatabaseUtil);
mockIdentityDataBaseUtilConnection(connection1, false, identityDatabaseUtil);
UserSessionStore.getInstance().storeUserSessionData(userId, sessionId);
}
}
Expand Down

0 comments on commit 92db6fe

Please sign in to comment.