Uploaded image for project: 'Spring Data Redis'
  1. Spring Data Redis
  2. DATAREDIS-435

PubSubResubscribeTests and PubSubTests rely on other tests having already run previously

    Details

    • Sprint:
      SpringOne 2015

      Description

      If PubSubResubscribeTests or PubSubTests run before another test that's instantiated RedisTestProfileValueSource they fail with a NullPointerException:

      java.lang.NullPointerException
      	at org.springframework.data.redis.RedisTestProfileValueSource.matches(RedisTestProfileValueSource.java:112)
      	at org.springframework.data.redis.listener.PubSubResubscribeTests.shouldRun(PubSubResubscribeTests.java:85)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      (31 more lines...)
      

      And:

      java.lang.NullPointerException
      	at org.springframework.data.redis.RedisTestProfileValueSource.matches(RedisTestProfileValueSource.java:112)
      	at org.springframework.data.redis.listener.PubSubTests.shouldRun(PubSubTests.java:78)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      (31 more lines...)
      

      You can recreate the problem by running either of the two test classes on their own in your IDE. I just saw the failure trying to build Spring IO Platform 2.0 RC1 (which is using Spring Data Redis 1.6.0.RELEASE). I'd appreciate a backport of any fix you make to all maintained branches as it's a huge pain to have these two tests be the only two that fail among the 10000s of tests that the Platform runs to verify compatibility.

        Attachments

          Activity

            People

            • Assignee:
              cstrobl Christoph Strobl
              Reporter:
              awilkinson Andy Wilkinson
              Last updater:
              Oliver Gierke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: