[jira] [Commented] (SUREFIRE-1328) Test should throw ClassCastException but doesn't
[ https://issues.apache.org/jira/browse/SUREFIRE-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962591#comment-15962591 ] Ossian Petri commented on SUREFIRE-1328: My expectations are that both tests should fail and not just one of them. The first test is doing the exactly same thing except for line 48 in the second test that should not have any effect. > Test should throw ClassCastException but doesn't > > > Key: SUREFIRE-1328 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1328 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.19.1 > Environment: Windows and Linux (Ubuntu 14.04); Java 1.8.0 111 and 112 > x64; junit 4.12; mockito 2.6.8; assertj 3.6.2 >Reporter: Ossian Petri > Attachments: surefireBug.zip > > > When using argument captor together with assertThat::isInstanceOf in the > example code that is provided an ClassCastException is expected. This > behavior can be seen when running the test from command line and as well from > Intellij which uses surefire plugin. However this code behaves predictably in > Eclipse since it has its own test executor. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SUREFIRE-1328) Test should throw ClassCastException but doesn't
[ https://issues.apache.org/jira/browse/SUREFIRE-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962591#comment-15962591 ] Ossian Petri edited comment on SUREFIRE-1328 at 4/10/17 8:41 AM: - My expectations are that both tests should fail and not just one of them. The first test is doing the exactly same thing except for line 48 in the second test that should not have any effect. You cant see a more detailed explanation in the code comments in the example I attached. was (Author: sywor): My expectations are that both tests should fail and not just one of them. The first test is doing the exactly same thing except for line 48 in the second test that should not have any effect. > Test should throw ClassCastException but doesn't > > > Key: SUREFIRE-1328 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1328 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.19.1 > Environment: Windows and Linux (Ubuntu 14.04); Java 1.8.0 111 and 112 > x64; junit 4.12; mockito 2.6.8; assertj 3.6.2 >Reporter: Ossian Petri > Attachments: surefireBug.zip > > > When using argument captor together with assertThat::isInstanceOf in the > example code that is provided an ClassCastException is expected. This > behavior can be seen when running the test from command line and as well from > Intellij which uses surefire plugin. However this code behaves predictably in > Eclipse since it has its own test executor. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SUREFIRE-1328) Test should throw ClassCastException but doesn't
[ https://issues.apache.org/jira/browse/SUREFIRE-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962726#comment-15962726 ] Ossian Petri commented on SUREFIRE-1328: No. I would expect both tests to fail. I have attached a screenshots from Eclipse, there you can see both tests fails for the same reason. > Test should throw ClassCastException but doesn't > > > Key: SUREFIRE-1328 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1328 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.19.1 > Environment: Windows and Linux (Ubuntu 14.04); Java 1.8.0 111 and 112 > x64; junit 4.12; mockito 2.6.8; assertj 3.6.2 >Reporter: Ossian Petri >Assignee: Tibor Digana > Attachments: 2017-04-10 13_09_48-surefireBug.jpg, surefireBug.zip, > test_eclipes.png, testThatActualFails_eclipes.png > > > When using argument captor together with assertThat::isInstanceOf in the > example code that is provided an ClassCastException is expected. This > behavior can be seen when running the test from command line and as well from > Intellij which uses surefire plugin. However this code behaves predictably in > Eclipse since it has its own test executor. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (SUREFIRE-1328) Test should throw ClassCastException but doesn't
[ https://issues.apache.org/jira/browse/SUREFIRE-1328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ossian Petri updated SUREFIRE-1328: --- Attachment: testThatActualFails_eclipes.png test_eclipes.png > Test should throw ClassCastException but doesn't > > > Key: SUREFIRE-1328 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1328 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.19.1 > Environment: Windows and Linux (Ubuntu 14.04); Java 1.8.0 111 and 112 > x64; junit 4.12; mockito 2.6.8; assertj 3.6.2 >Reporter: Ossian Petri >Assignee: Tibor Digana > Attachments: 2017-04-10 13_09_48-surefireBug.jpg, surefireBug.zip, > test_eclipes.png, testThatActualFails_eclipes.png > > > When using argument captor together with assertThat::isInstanceOf in the > example code that is provided an ClassCastException is expected. This > behavior can be seen when running the test from command line and as well from > Intellij which uses surefire plugin. However this code behaves predictably in > Eclipse since it has its own test executor. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (SUREFIRE-1328) Test should throw ClassCastException but doesn't
Ossian Petri created SUREFIRE-1328: -- Summary: Test should throw ClassCastException but doesn't Key: SUREFIRE-1328 URL: https://issues.apache.org/jira/browse/SUREFIRE-1328 Project: Maven Surefire Issue Type: Bug Components: Junit 4.x support, Maven Surefire Plugin Affects Versions: 2.19.1 Environment: Windows and Linux (Ubuntu 14.04); Java 1.8.0 111 and 112 x64; junit 4.12; mockito 2.6.8; assertj 3.6.2 Reporter: Ossian Petri Attachments: surefireBug.zip When using argument captor together with assertThat::isInstanceOf in the example code that is provided an ClassCastException is expected. This behavior can be seen when running the test from command line and as well from Intellij which uses surefire plugin. However this code behaves predictably in Eclipse since it has its own test executor. -- This message was sent by Atlassian JIRA (v6.3.4#6332)