chg: remove unused local variables
authorINOPIAE <m.maengel@inopiae.de>
Tue, 20 Feb 2018 21:11:23 +0000 (22:11 +0100)
committerINOPIAE <m.maengel@inopiae.de>
Thu, 22 Feb 2018 06:15:09 +0000 (07:15 +0100)
Change-Id: I7bc5a83c0039cf91dd8df3e19f644c5c1f0a3fd4

tests/club/wpia/gigi/TestUser.java
tests/club/wpia/gigi/pages/account/TestCertificateRequest.java
tests/club/wpia/gigi/ping/TestSSL.java

index a2206ee..dfd9fc3 100644 (file)
@@ -21,15 +21,12 @@ import club.wpia.gigi.dbObjects.User;
 import club.wpia.gigi.dbObjects.Verification;
 import club.wpia.gigi.dbObjects.Verification.VerificationType;
 import club.wpia.gigi.testUtils.BusinessTest;
-import club.wpia.gigi.util.DayDate;
 import club.wpia.gigi.util.Notary;
 
 public class TestUser extends BusinessTest {
 
     @Test
     public void testStoreAndLoad() throws SQLException, GigiApiException {
-        long dob = System.currentTimeMillis();
-        dob -= dob % (1000 * 60 * 60 * 24);
         User u = createUser("f", "l", createUniqueName() + "a@email.org", TEST_PASSWORD);
         int id = u.getId();
         User u2 = User.getById(id);
@@ -123,8 +120,6 @@ public class TestUser extends BusinessTest {
 
     @Test
     public void testDoubleInsert() throws GigiApiException {
-        long d = System.currentTimeMillis();
-        d -= d % DayDate.MILLI_DAY;
         User u = createUser("f", "l", createUniqueName() + "@example.org", TEST_PASSWORD);
         Verification[] ma = u.getMadeVerifications();
         Verification[] ma2 = u.getMadeVerifications();
index da580cc..03c9a8d 100644 (file)
@@ -95,8 +95,8 @@ public class TestCertificateRequest extends ClientTest {
     public void testPingPeriodOneAddress() throws IOException, GeneralSecurityException, GigiApiException {
         // get new email address with last ping in past
         String furtherEmail = createUniqueName() + "@example.org";
-        EmailAddress ea = new EmailAddress(u, furtherEmail, Locale.ENGLISH);
-        TestMail mail = getMailReceiver().receive(furtherEmail);
+        new EmailAddress(u, furtherEmail, Locale.ENGLISH);
+        getMailReceiver().receive(furtherEmail);
         try (GigiPreparedStatement stmt = new GigiPreparedStatement("UPDATE `emailPinglog` SET `status`='success'::`pingState`, `when` = (now() - interval '1 months' * ?::INTEGER) WHERE `email`=? ")) {
             stmt.setInt(1, TimeConditions.getInstance().getEmailPingMonths());
             stmt.setString(2, furtherEmail);
@@ -118,8 +118,8 @@ public class TestCertificateRequest extends ClientTest {
     public void testPingPeriodTwoAddresses() throws IOException, GeneralSecurityException, GigiApiException {
         // get new email address with last ping in past
         String furtherEmail = createUniqueName() + "@example.org";
-        EmailAddress ea = new EmailAddress(u, furtherEmail, Locale.ENGLISH);
-        TestMail mail = getMailReceiver().receive(furtherEmail);
+        new EmailAddress(u, furtherEmail, Locale.ENGLISH);
+        getMailReceiver().receive(furtherEmail);
         try (GigiPreparedStatement stmt = new GigiPreparedStatement("UPDATE `emailPinglog` SET `status`='success'::`pingState`, `when` = (now() - interval '1 months' * ?::INTEGER) WHERE `email`=? ")) {
             stmt.setInt(1, TimeConditions.getInstance().getEmailPingMonths());
             stmt.setString(2, furtherEmail);
index e4c5de0..1b58acc 100644 (file)
@@ -200,8 +200,8 @@ public class TestSSL extends PingTest {
         ass.start();
         System.out.println(port + " and " + port2 + " ready");
         System.err.println(port + " and " + port2 + " ready");
-        boolean accept2 = acceptSSLServer(sss2);
-        boolean accept1 = ass.join();
+        acceptSSLServer(sss2);
+        ass.join();
         // assertTrue(firstSucceeds ^ accept1);
         boolean secondsSucceeds = sslVariant != 0;
         // assertTrue(secondsSucceeds ^ accept2);