[JBoss JIRA] (ARQ-1809) @ShouldMatchDataSet is broken when ordering by non-string columns
by Steven Dodd (JIRA)
Steven Dodd created ARQ-1809:
--------------------------------
Summary: @ShouldMatchDataSet is broken when ordering by non-string columns
Key: ARQ-1809
URL: https://issues.jboss.org/browse/ARQ-1809
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha7
Reporter: Steven Dodd
Assignee: Bartosz Majsak
Steps to reproduce:
1. Create a table, "test", with a single column, an integer primary key, "id".
2. Try the following test case under the persistence extension:
{code}
@UsingDataSet({test.yml})
@ShouldMatchDataSet(value={test.yml})
@Test
public void test() {
// do nothing
}
{code}
{code:title=test.yml}
test:
- id: -1
- id: -2
{code}
Result: test fails.
Reason:
The expected dataset is loaded by the YamlDataSetProducer, and has all of its column types set to UNKNOWN.
The actual dataset is loaded by <whatever>, and has all of its column types set to their actual types in the database.
DataSetComparator wraps each dataset in a SortedTable, to provide a consistent ordering for comparison.
SortedTable ends up sorting every column of the expected dataset as strings, because the column types are UNKNOWN, but it sorts the actual dataset columns using their actual column types, e.g. numeric sort in the test case above.
As a result, the expected and actual datasets are not consistently sorted for comparison, which results in totally inaccurate comparison results.
Suggested Fix:
The expected dataset needs to have accurate column types assigned, not UNKNOWN.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 6 months
[JBoss JIRA] (ARQ-1808) The original cause of Exception in container is lost if exception is of type InvocationTargetException
by Aslak Knutsen (JIRA)
Aslak Knutsen created ARQ-1808:
----------------------------------
Summary: The original cause of Exception in container is lost if exception is of type InvocationTargetException
Key: ARQ-1808
URL: https://issues.jboss.org/browse/ARQ-1808
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Base Implementation
Affects Versions: 1.1.5.Final
Reporter: Aslak Knutsen
Assignee: Aslak Knutsen
As oppose to most other Exceptions, InvocationTargetException does not use the cause field as the cause of the InvocationTargetException, rather it uses target.
When the ExceptionProxy recreates the Exceptions from the container side on the client side, the actual cause of the InvocationTargetException is lost.
The only cause you get is something like: Could not create ManagerImpl.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 6 months
[JBoss JIRA] (ARQ-1807) Exceptions in JUnit After will mask exceptions that happen in Before/Test
by Aslak Knutsen (JIRA)
Aslak Knutsen created ARQ-1807:
----------------------------------
Summary: Exceptions in JUnit After will mask exceptions that happen in Before/Test
Key: ARQ-1807
URL: https://issues.jboss.org/browse/ARQ-1807
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Test Harness Integration
Affects Versions: 1.1.5.Final
Reporter: Aslak Knutsen
Assignee: Aslak Knutsen
Fix For: 2.0.0.Beta1
Exceptions in the After phase will override exceptions that happened in Before and Test.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 6 months