You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Ahmed Eldawy (JIRA)" <ji...@apache.org> on 2015/11/25 23:14:10 UTC
[jira] [Created] (ASTERIXDB-1200)
AbstractIntegrationTest#runTestAndCompareResults fails when the output file
is empty
Ahmed Eldawy created ASTERIXDB-1200:
---------------------------------------
Summary: AbstractIntegrationTest#runTestAndCompareResults fails when the output file is empty
Key: ASTERIXDB-1200
URL: https://issues.apache.org/jira/browse/ASTERIXDB-1200
Project: Apache AsterixDB
Issue Type: Bug
Components: Test Framework
Environment: Ubuntu 15.04
Eclipse
Oracle JDK 8
Reporter: Ahmed Eldawy
Priority: Minor
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)