This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new 0123369  no jira: additional test with multiple login of same LDAP 
user is added
0123369 is described below

commit 0123369217a17009126f1d2ede89f5afb4320ead
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Mon Mar 30 20:46:18 2020 +0700

    no jira: additional test with multiple login of same LDAP user is added
---
 .../src/test/java/org/apache/openmeetings/ldap/TestLdap.java        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/ldap/TestLdap.java 
b/openmeetings-web/src/test/java/org/apache/openmeetings/ldap/TestLdap.java
index 82f2db8..d34939a 100644
--- a/openmeetings-web/src/test/java/org/apache/openmeetings/ldap/TestLdap.java
+++ b/openmeetings-web/src/test/java/org/apache/openmeetings/ldap/TestLdap.java
@@ -29,6 +29,7 @@ import static 
org.apache.openmeetings.core.ldap.LdapOptions.CONFIGKEY_LDAP_SEARC
 import static 
org.apache.openmeetings.core.ldap.LdapOptions.CONFIGKEY_LDAP_SEARCH_SCOPE;
 import static org.apache.openmeetings.util.OmFileHelper.getLdapConf;
 import static org.apache.openmeetings.util.OmFileHelper.loadLdapConf;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -125,6 +126,11 @@ public class TestLdap extends AbstractWicketTester {
        public void testSbndSessionLogin() throws OmException {
                LdapConfig cfg = CFG_MAP.get(CFG_SEARCH_BIND);
                assertTrue(WebSession.get().signIn(USER1, userpass, 
User.Type.LDAP, cfg.getId()), "Login should be successful");
+               //do login second time
+               WebSession.get().invalidateNow();
+               assertTrue(WebSession.get().signIn(USER1, userpass, 
User.Type.LDAP, cfg.getId()), "Login should be successful");
+               //check DB
+               assertEquals(1, userDao.count(USER1), "There should be exactly 
one user after multiple logins");
        }
 
        @Test

Reply via email to