Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-1200

AbstractIntegrationTest#runTestAndCompareResults fails when the output file is empty

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TEST - Test Framework
    • Labels:
    • Environment:
      Ubuntu 15.04
      Eclipse
      Oracle JDK 8

      Description

      I have a test case which has five tuples in the expected answer. If the actual resul file is empty, I expect the test to fail with an assertion failure. However, it fails with the following ArrayIndexOutOfBoundsException.
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.ArrayList.rangeCheck(ArrayList.java:653)
      at java.util.ArrayList.get(ArrayList.java:429)
      at org.apache.hyracks.tests.integration.AbstractIntegrationTest.runTestAndCompareResults(AbstractIntegrationTest.java:196)
      ....
      I tried to modify the condition
      while ((expectedLine = expectedFile.readLine()) != null)
      to
      while (j < results.size() && (expectedLine = expectedFile.readLine()) != null)

      but the test passed with no failures.
      Although, in my case, the test does not pass, it fails with an exception instead of an assertion error.

        Attachments

          Activity

            People

            • Assignee:
              imaxon Ian Maxon
              Reporter:
              aseldawy Ahmed Eldawy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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