Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91175858 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Fix protocol test failures

parent bd794c3f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -282,8 +282,6 @@ public class MockImapServer {
                while (!shouldStop) {
                    readAdditionalCommands();
                }

                waitForConnectionClosed.countDown();
            } catch (UnexpectedCommandException e) {
                unexpectedCommandException = e;
            } catch (IOException e) {
@@ -293,9 +291,10 @@ public class MockImapServer {
            } catch (KeyStoreException | CertificateException | UnrecoverableKeyException |
                    NoSuchAlgorithmException | KeyManagementException e) {
                throw new RuntimeException(e);
            }

            } finally {
                waitForConnectionClosed.countDown();
                IOUtils.closeQuietly(socket);
            }

            logger.log("Exiting");
        }
+2 −0
Original line number Diff line number Diff line
@@ -82,12 +82,14 @@ class Pop3Connection {

            performAuthentication(settings.getAuthType(), serverGreeting);
        } catch (SSLException e) {
            close();
            if (e.getCause() instanceof CertificateException) {
                throw new CertificateValidationException(e.getMessage(), e);
            } else {
                throw new MessagingException("Unable to connect", e);
            }
        } catch (GeneralSecurityException gse) {
            close();
            throw new MessagingException(
                    "Unable to open connection to POP server due to security error.", gse);
        } catch (IOException ioe) {
+3 −4
Original line number Diff line number Diff line
@@ -282,8 +282,6 @@ public class MockPop3Server {
                while (!shouldStop) {
                    readAdditionalCommands();
                }

                waitForConnectionClosed.countDown();
            } catch (UnexpectedCommandException e) {
                unexpectedCommandException = e;
            } catch (IOException e) {
@@ -293,9 +291,10 @@ public class MockPop3Server {
            } catch (KeyStoreException | CertificateException | UnrecoverableKeyException |
                    NoSuchAlgorithmException | KeyManagementException e) {
                throw new RuntimeException(e);
            }

            } finally {
                waitForConnectionClosed.countDown();
                IOUtils.closeQuietly(socket);
            }

            logger.log("Exiting");
        }
+3 −4
Original line number Diff line number Diff line
@@ -284,8 +284,6 @@ public class MockSmtpServer {
                while (!shouldStop) {
                    readAdditionalCommands();
                }

                waitForConnectionClosed.countDown();
            } catch (UnexpectedCommandException e) {
                unexpectedCommandException = e;
            } catch (IOException e) {
@@ -295,9 +293,10 @@ public class MockSmtpServer {
            } catch (KeyStoreException | CertificateException | UnrecoverableKeyException |
                    NoSuchAlgorithmException | KeyManagementException e) {
                throw new RuntimeException(e);
            }

            } finally {
                waitForConnectionClosed.countDown();
                IOUtils.closeQuietly(socket);
            }

            logger.log("Exiting");
        }