Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-4780

Accessing randomly ordered array by index in EmailDeadlinesBaseTest and TaskReminderTest classes

    XMLWordPrintable

Details

    • NEW
    • NEW

    Description

      In classes EmailDeadlinesBaseTest and TaskReminderTest there are tests that test e-mail functionality. In these tests there is this code:
      _
      assertEquals("tony@domain.com", ((InternetAddress) msg.getRecipients(RecipientType.TO)[0]).getAddress());
      assertEquals("darth@domain.com", ((InternetAddress) msg.getRecipients(RecipientType.TO)[1]).getAddress());_

      This is wrong, because received messages are randomly ordered, because they are sent asynchronously.

      Attachments

        Activity

          People

            tzimanyi@redhat.com Tibor Zimányi
            tzimanyi@redhat.com Tibor Zimányi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: