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

Some Weld ftests fail due to dependence between test methods

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.1.8.Final
    • Fix Version/s: None
    • Component/s: Examples
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rsmeral Ron Šmeral
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: