Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-18152

mockito-inline causes tests to fail beacause o.a.c.distributed.mock.nodetool.InternalNodeProbe spies on StorageServiceMBean

    XMLWordPrintableJSON

Details

    Description

      While working on CASSANDRA-14361, when we included mockito-inline into the build to test the new functionality, unrelated tests in CI started to fail. (1)

      This is happening because mockito, together with stuff which enables static mocking, just does not play together with our way of doing things in dtest framework.

      The workaround is consisting of removing Mockito from InternalNodeProbe, it tries to spy on StorageService to not send any notifications back. This might be workarounded so we do not need Mockito hence tests are fixed and mocking of static methods is possible without any other tests failing.

      (1) https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/2168/#showFailuresLink

      see also: https://github.com/mockito/mockito/issues/2203

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              smiklosovic Stefan Miklosovic
              Stefan Miklosovic
              Andres de la Peña, Stefan Miklosovic
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h