Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16222 Address Intellij WARNINGS in Test Code
  3. SOLR-16300

Migrate from deprecated assertThat() to org.hamcrest.MatcherAssert.assertThat()

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 9.0, main (10.0)
    • main (10.0), 9.2
    • Tests
    • None

    Description

      The org.junit.Assert that our unit tests all extend from indicates that assertThat() is deprecated, and to use org.hamcrest.MatcherAssert.assertThat() instead.

      We currently in our tests have both a mix of the assertThat() AND MatcherAssert.assertThat() methods...

      It appears that I can also just override the assertThat() method defined in org.junit.Assert in our base test classes to be one that calls out MatcherAssert.assertThat() which might let us change fewer lines of code..

      I'd love some direction from more experienced folks on what the right direction to go is!

      Attachments

        Issue Links

          Activity

            People

              epugh Eric Pugh
              epugh Eric Pugh
              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 - 5h 10m
                  5h 10m