[JBoss JIRA] (ARQ-1804) When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1804?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1804.
------------------------------
> When using @Test expected exception, the internal state of the TestResult is unknown - TestNG
> ---------------------------------------------------------------------------------------------
>
> Key: ARQ-1804
> URL: https://issues.jboss.org/browse/ARQ-1804
> Project: Arquillian
> Issue Type: Bug
> Components: Test Harness Integration
> Reporter: Aslak Knutsen
> Assignee: Aslak Knutsen
> Priority: Minor
> Fix For: 1.1.5.Final
>
>
> When using the ExpectedException feature in the TestFrameworks the internal TestResult object in Arquillian is in an unknown state. Arquillian catches the thrown exception, but the actual validation of it is done in the test framework after Arquillian is done with the test invocation. Arquillian can only know that a Exception has been thrown, but not if it is expected or not.
> TestNG
> @Test(expectedException=Exception.class)
> @ExpectedException(Exception.class)
> Follow up with TestNG to see how this can be done..
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1437) NPE in ExceptionProxy.readExternal() for root cause leads to deserializationProblem = true
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1437?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1437.
------------------------------
> NPE in ExceptionProxy.readExternal() for root cause leads to deserializationProblem = true
> ------------------------------------------------------------------------------------------
>
> Key: ARQ-1437
> URL: https://issues.jboss.org/browse/ARQ-1437
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.0.2.Final, 1.1.0.Final
> Reporter: Falko M.
> Assignee: Aslak Knutsen
> Priority: Minor
> Fix For: 1.1.5.Final
>
>
> See line 199 (for 1.0.2.Final):
> {code}
> // reset the cause, so we can de-serialize them individual
> SecurityActions.setFieldValue(Throwable.class, original, "cause", causeProxy.createException());
> {code}
> For the root cause of an exception, {{causeProxy}} will always be {{null}} and so a {{NullPointerException}} is thrown.
> As the code is wrapped in a try block with follwoing catch block:
> {code}
> catch (Throwable e) // ClassNotFoundExcpetion / NoClassDefFoundError
> {
> // ignore, could not load class on client side, move on and create a fake 'proxy' later
> deserializationProblem = true;
> }
> {code}
> the NPE is caught and is "expected" to be a {{ClassNotFoundExcpetion}} or {{NoClassDefFoundError}} which is clearly not the case.
> *Possible fix:*
> {{original.cause}} should only be overwritten when {{causeProxy}} is *not* null.
> *More context information:*
> I came across this problem while trying to find the reason for an unexpected {{ArquillianProxyException}}:
> {code}org.jboss.arquillian.test.spi.ArquillianProxyException: javax.ejb.EJBException : javax.persistence.OptimisticLockException [Proxied because : Original exception not deserilizable, ClassNotFoundException]{code}
> The root problem was not the NPE, but the {{ClassNotFoundException}} mislead me and so I debugged {{ExceptionProxy}}.
> I my case there is an {{InvalidClassException}} because of an older hibernate version on the client side.
> +So that is another problem of {{ExceptionProxy}} as it assumes that only {{ClassNotFoundExcpetion}} or {{NoClassDefFoundError}} can occur!+
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1758) Test passes although it fails unexpectedly
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1758?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1758.
------------------------------
> Test passes although it fails unexpectedly
> ------------------------------------------
>
> Key: ARQ-1758
> URL: https://issues.jboss.org/browse/ARQ-1758
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Base Implementation
> Affects Versions: 1.1.4.Final
> Reporter: Robert Panzer
> Assignee: Aslak Knutsen
> Fix For: 1.1.5.Final
>
> Attachments: debug.png
>
>
> I have an erronous test class that cannot be loaded in the container due to a NoClassDefFoundError. (A dependent class is missing.)
> The test passes unexpectedly and all test methods are reported to have passed although log entries or SystemOuts show that the methods are actually never invoked.
> The problem seems to be a regression that came with the last release.
> In JUnitTestRunner the TestResults exception is overwritten with null in such a case.
> I will attach a screenshot of the debugger showing that.
> I also have a try of a patch that I will link as soon as I prepared the pull request on github.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1607) Please avoid using arquillian.launch files, it makes Eclipse generate error logs
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1607?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1607.
------------------------------
> Please avoid using arquillian.launch files, it makes Eclipse generate error logs
> --------------------------------------------------------------------------------
>
> Key: ARQ-1607
> URL: https://issues.jboss.org/browse/ARQ-1607
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Environment: Eclipse
> Reporter: Fred Bricon
> Assignee: Aslak Knutsen
> Priority: Minor
> Fix For: 1.1.5.Final
>
>
> When imported in Eclipse, projects containing arquillian.launch files make Eclipse barf as it expects a valid Eclipse Launch configuration xml file.
> It's just an error in the .metadata/.log, but the sight of such ugly stacktraces could be frightening/annoying for some
> {noformat}
> !MESSAGE org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Contenu non autorisé dans le prologue. occurred while reading launch configuration file: D:\tmp\arquillian-examples\arquillian-persistence-tutorial\target\test-classes\arquillian.launch.
> !STACK 0
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Contenu non autorisé dans le prologue.
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
> at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
> at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
> at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1388)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:998)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
> at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:237)
> at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)
> at org.eclipse.debug.internal.core.LaunchManager.createInfoFromXML(LaunchManager.java:929)
> at org.eclipse.debug.internal.core.LaunchManager.getInfo(LaunchManager.java:1353)
> at org.eclipse.debug.internal.core.LaunchConfiguration.getInfo(LaunchConfiguration.java:453)
> at org.eclipse.debug.internal.core.LaunchConfiguration.getType(LaunchConfiguration.java:617)
> at org.eclipse.debug.internal.core.LaunchManager.isValid(LaunchManager.java:2081)
> at org.eclipse.debug.internal.core.LaunchManager.launchConfigurationAdded(LaunchManager.java:2104)
> at org.eclipse.debug.internal.core.LaunchManager$LaunchManagerVisitor.visit(LaunchManager.java:382)
> {noformat}
> From IRC
> {quote}
> (15:46:37) fbricon: hey aslak, I'm looking at a some maven projects containing some arquillian.launch files
> (15:47:18) fbricon: eclipse treats these as Launch configuration files and complains they're malformed xml
> (15:47:38) fbricon: do the files need to be .launch?
> 15:47:58) aslak: fbricon hehe yea.. noticed that as well..
> (15:48:22) aslak: it ended up being called arquillian.launch because that's the name of the -D property that does the same
> (15:48:50) aslak: fbricon could you file an issue on this.. I'll add support for arquillian.launch.properties or arquillian-launch or similar
> {quote}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months
[JBoss JIRA] (ARQ-1772) Arquillian Debug does not print real event class
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1772?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1772.
------------------------------
> Arquillian Debug does not print real event class
> ------------------------------------------------
>
> Key: ARQ-1772
> URL: https://issues.jboss.org/browse/ARQ-1772
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Base Implementation
> Affects Versions: 1.1.4.Final
> Reporter: Karel Piwko
> Assignee: Aslak Knutsen
> Fix For: 1.1.5.Final
>
>
> When using inheritance to define events, Arquillian Debug prints out following:
> {code}
> (E) PrepareDrone
> (O) EventRegisterObserver.register
> (O) DroneConfigurator.prepareDrone
> (E) DroneConfigurationEvent
> (O) EventRegisterObserver.register
> (E) DroneConfigurationEvent
> (O) EventRegisterObserver.register
> (E) DroneLifecycleEvent
> (O) EventRegisterObserver.register
> (E) DroneLifecycleEvent
> (O) EventRegisterObserver.register
> (E) Before
> (O) EventRegisterObserver.register
> (O) DroneLifecycleManager.before
> (E) DroneLifecycleEvent
> (O) EventRegisterObserver.register
> (E) DroneLifecycleEvent
> (O) EventRegisterObserver.register
> (O) DroneEnhancer.enhanceDrone
> (E) DroneLifecycleEvent
> (O) EventRegisterObserver.register
> (E) DroneLifecycleEvent
> (O) EventRegisterObserver.register
> (O) DroneEnhancer.enhanceDrone
> {code}
> Which is not really super useful, as debug log can't show what actual events were fired.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
11 years, 9 months