Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-843

Unit test SMTPAppender_GreenTest fails: GreenMail not initialized

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • None
    • Debian

    Description

      SMTPAppender_GreenTest fails on my machine. It seems GreenMail is not yet ready to receive mails when the mails are triggered by the smtpAppender:

      Failed tests: html(ch.qos.logback.classic.net.SMTPAppender_GreenTest): expected:<1> but was:<0>
      syncronousSmoke(ch.qos.logback.classic.net.SMTPAppender_GreenTest): expected:<1> but was:<0>
      LBCLASSIC_104(ch.qos.logback.classic.net.SMTPAppender_GreenTest): expected:<1> but was:<0>
      bufferShouldBeResetBetweenMessages(ch.qos.logback.classic.net.SMTPAppender_GreenTest): expected:<2> but was:<0>

      Adding some delay after the greenmail server intialization -in SMTPAppender_GreenTest) fixes the issue:

      greenMailServer.start();
      Thread.currentThread().sleep(2000);

      Attachments

        Activity

          People

            logback-dev Logback dev list
            corona Gabriel Corona
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: