Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-344

testConversationsDontCrossSessionBoundary{1,2} broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.1.CR1, 1.2.0.Beta1
    • 1.1.0.SP2
    • Tests
    • None

      org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest.testConversationsDontCrossSessionBoundary1() and testConversationsDontCrossSessionBoundary2()

      test that a conversation does not cross session boundary.

      Both these tests end with an assertion that is supposed to verify that the conversation context is not propagated across the session boundary and looks like this:

      assert !hasRained(client.getPage(getPath("rain.jsf", cid)));

      where hasRained() checks for an HTTP header which is supposed to be set by ConversationTestPhaseListener.

      The problem with this is that the hasRained() method has very tolerant implementation which returns false even if the header is not set at all. That's why the tests pass actually. It's not that the PhaseListener sets the value to false but the PhaseListener is not invoked at all! That opens rooms for a whole class of implementations that do not implement the spec properly yet they pass the TCK.

      What these tests should really be doing is to verify that NonexistentConversationException is thrown. OutermostFilter can be reused for this.

            mkouba@redhat.com Martin Kouba
            rhn-engineering-jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: