Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1137

Some Weld ftests fail due to dependence between test methods

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 1.1.8.Final
    • Examples
    • None

    Description

      PermalinkTest fails when executed on Solaris 10, even though it works in other environments.

      java.lang.AssertionError: A name of comment's author expected
      	at org.junit.Assert.fail(Assert.java:91)
      	at org.junit.Assert.assertTrue(Assert.java:43)
      	at org.jboss.weld.examples.permalink.ftest.PermalinkTest.permanentLinkTest(PermalinkTest.java:104)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              ...
      

      The test class contains two tests – permanentLinkTest and addCommentOnTopicTest.
      The permanentLinkTest fails when it's executed first, because its success is contingent on content generated by addCommentOnTopicTest.
      Given that the order of test execution is arbitrary, permanentLinkTest actually gets executed first sometimes.

      Thus, correct order of execution should be enforced, for example by annotating the methods with @org.jboss.arquillian.junit.InSequence or by eliminating dependence between test methods.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rsmeral Ron Šmeral (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: