Skip to content
Permalink
Browse files

Revert ServerProperties at test-ending

  • Loading branch information...
bear101 committed Aug 7, 2019
1 parent 874d0b3 commit bb22396a77d84767fa3a004f1ef5ebe82f78042e
Showing with 8 additions and 1 deletion.
  1. +8 −1 Library/TeamTalkJNI/test/dk/bearware/TeamTalkTestCase.java
@@ -1998,6 +1998,7 @@ public void testLoginDelay() throws InterruptedException {

ServerProperties srvprop = new ServerProperties();
assertTrue(ttadmin.getServerProperties(srvprop));
int orgValue = srvprop.nLoginDelayMSec;
srvprop.nLoginDelayMSec = 1000;
assertTrue(waitCmdSuccess(ttadmin, ttadmin.doUpdateServer(srvprop), DEF_WAIT));

@@ -2021,7 +2022,7 @@ public void testLoginDelay() throws InterruptedException {
Thread.sleep(2000);
login(ttclient2, NICKNAME, USERNAME, PASSWORD);

srvprop.nLoginDelayMSec = 0;
srvprop.nLoginDelayMSec = orgValue;
assertTrue(waitCmdSuccess(ttadmin, ttadmin.doUpdateServer(srvprop), DEF_WAIT));
}

@@ -2033,6 +2034,9 @@ public void testLoginAttempts() {

ServerProperties srvprop = new ServerProperties();
assertTrue("get srvprop", ttadmin.getServerProperties(srvprop));

int oldValue = srvprop.nMaxLoginAttempts;

srvprop.nMaxLoginAttempts = 2;

assertTrue("update server", waitCmdSuccess(ttadmin, ttadmin.doUpdateServer(srvprop), DEF_WAIT));
@@ -2058,6 +2062,9 @@ public void testLoginAttempts() {
assertEquals("banned account", ClientError.CMDERR_SERVER_BANNED, msg.clienterrormsg.nErrorNo);

assertTrue("unban success", waitCmdSuccess(ttadmin, ttadmin.doUnBanUser(user.szIPAddress, 0), DEF_WAIT));

srvprop.nMaxLoginAttempts = 0;
assertTrue("update server", waitCmdSuccess(ttadmin, ttadmin.doUpdateServer(srvprop), DEF_WAIT));
}

public void testDisconnect() throws IOException {

0 comments on commit bb22396

Please sign in to comment.
You can’t perform that action at this time.