Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1963

Irregular failures in ResultTest#testMonitorResult



    • Type: Test
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.4.0, 4.5.0, 4.4.1
    • Component/s: None
    • Labels:


      While validating the 4.4.0 release candidates, I had to run the phoenix-pherf test cases a number of times to get them to pass.

      The offending test was ResultTest#testMonitorResult. I was running the test via maven clean install, and getting results such as the following:

      Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 6.034 sec <<< FAILURE! - in org.apache.phoenix.pherf.ResultTest
      testMonitorResult(org.apache.phoenix.pherf.ResultTest) Time elapsed: 4.363 sec <<< FAILURE!
      java.lang.AssertionError: Failed to get correct amount of CSV records. expected:<243> but was:<261>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:743)
      at org.junit.Assert.assertEquals(Assert.java:118)
      at org.junit.Assert.assertEquals(Assert.java:555)
      at org.apache.phoenix.pherf.ResultTest.testMonitorResult(ResultTest.java:99)

      An important thing to point out is that I was encountering this issue on a single-CPU virtual machine, so if there are some sensitive timing issues then they might be tickled by my setup.

      A quick look at the code doesn't show any directly obvious causes for this, but I did notice in the MonitorManager class that the resultHandler instance variable is protected via itself as a monitor in the run method, and protected by the this monitor in the readResults method. I'm not sure if this has anything to do with the underlying issue, but it does seem a bit questionable (i.e. different monitors are being used to lock access to a single variable).


        1. PHOENIX-1963.patch
          6 kB
          Cody Marcel
        2. PHOENIX-1963.patch
          6 kB
          Cody Marcel
        3. PHOENIX-1963-master.patch
          6 kB
          Cody Marcel



            • Assignee:
              cody.marcel@gmail.com Cody Marcel
              gabriel.reid Gabriel Reid
            • Votes:
              0 Vote for this issue
              7 Start watching this issue


              • Created: