Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18925

Need updated mockito for using java optional

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1, 2.0.0
    • None
    • None

    Description

      Came up when i was trying to test HBASE-18878.
      It kept failing because mock of RpcCall returned null where return type was Optional<User>.
      Instead, we want it to return Optional.empty().
      New mockito versions support this (and other java8 things) - https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2

      We use mockito-all which was last released in Dec2014. However, mockito-core has had more than 50 releases after that (https://mvnrepository.com/artifact/org.mockito/mockito-core).
      We need to change our deps from mockito-all to mockito-core.
      However that comes with fair breakages, so this is not a simple task of changing pom files.

      Attachments

        1. HBASE-18925.master.001.patch
          35 kB
          Apekshit Sharma
        2. HBASE-18925.master.002.patch
          41 kB
          Michael Stack
        3. HBASE-18925.master.002.patch
          41 kB
          Apekshit Sharma
        4. HBASE-18925.master.003.patch
          42 kB
          Apekshit Sharma
        5. HBASE-18925.master.004.patch
          44 kB
          Apekshit Sharma
        6. HBASE-18925.master.005.patch
          124 kB
          Apekshit Sharma
        7. HBASE-18925.master.006.patch
          125 kB
          Apekshit Sharma
        8. HBASE-18925.master.007.patch
          125 kB
          Apekshit Sharma
        9. HBASE-18925.master.008.patch
          132 kB
          Apekshit Sharma
        10. HBASE-18925.master.009.patch
          137 kB
          Apekshit Sharma

        Issue Links

          Activity

            People

              appy Apekshit Sharma
              appy Apekshit Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: