Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BD65119104 for ; Wed, 13 Apr 2016 19:10:25 +0000 (UTC) Received: (qmail 47372 invoked by uid 500); 13 Apr 2016 19:10:25 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 47326 invoked by uid 500); 13 Apr 2016 19:10:25 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 47315 invoked by uid 99); 13 Apr 2016 19:10:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2016 19:10:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 84A792C14E1 for ; Wed, 13 Apr 2016 19:10:25 +0000 (UTC) Date: Wed, 13 Apr 2016 19:10:25 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-2544) Some test cases using PowerMock fail with Java 8u20 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-2544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239870#comment-15239870 ] ASF GitHub Bot commented on FLINK-2544: --------------------------------------- GitHub user skavulya opened a pull request: https://github.com/apache/flink/pull/1882 [FLINK-2544] Add Java 8 version for building PowerMock tests to docs Java 8 update 11 introduced a stricter bytecode verifier that leads to failures in unit tests that use the PowerMock runner. The tests run correctly in Java 8u51 or above. This PR updates the README with a note about the Java versions needed to run unit tests that use the PowerMock runner. You can merge this pull request into a Git repository by running: $ git pull https://github.com/skavulya/flink update-readme Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/1882.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1882 ---- commit 574e25a59dde5c1f85ce2fbac574b5a6f252d734 Author: spkavuly Date: 2016-04-13T19:02:57Z [FLINK-2544] Add Java 8 version for building PowerMock tests to docs Java 8 update 11 introduced a stricter bytecode verifier that leads to failures in unit tests that use the PowerMock runner. The tests run correctly in Java 8u51 or above. ---- > Some test cases using PowerMock fail with Java 8u20 > --------------------------------------------------- > > Key: FLINK-2544 > URL: https://issues.apache.org/jira/browse/FLINK-2544 > Project: Flink > Issue Type: Bug > Reporter: Till Rohrmann > Priority: Minor > > I observed that some of the test cases using {{PowerMockRunner}} fail with Java 8u20 with the following error: > {code} > java.lang.VerifyError: Bad method call from inside of a branch > Exception Details: > Location: > org/apache/flink/client/program/ClientTest$SuccessReturningActor.()V @32: invokespecial > Reason: > Error exists in the bytecode > Bytecode: > 0x0000000: 2a4c 1214 b800 1a03 bd00 0d12 1bb8 001f > 0x0000010: b800 254e 2db2 0029 a500 0e2a 01c0 002b > 0x0000020: b700 2ea7 0009 2bb7 0030 0157 2a01 4c01 > 0x0000030: 4d01 4e2b 01a5 0008 2b4e a700 0912 32b8 > 0x0000040: 001a 4e2d 1234 03bd 000d 1236 b800 1f12 > 0x0000050: 32b8 003a 3a04 1904 b200 29a6 000a b800 > 0x0000060: 3c4d a700 0919 04c0 0011 4d2c b800 42b5 > 0x0000070: 0046 b1 > Stackmap Table: > full_frame(@38,{UninitializedThis,UninitializedThis,Top,Object[#13]},{}) > full_frame(@44,{Object[#2],Object[#2],Top,Object[#13]},{}) > full_frame(@61,{Object[#2],Null,Null,Null},{Object[#2]}) > full_frame(@67,{Object[#2],Null,Null,Object[#15]},{Object[#2]}) > full_frame(@101,{Object[#2],Null,Null,Object[#15],Object[#13]},{Object[#2]}) > full_frame(@107,{Object[#2],Null,Object[#17],Object[#15],Object[#13]},{Object[#2]}) > at java.lang.Class.getDeclaredConstructors0(Native Method) > at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658) > at java.lang.Class.getConstructor0(Class.java:3062) > at java.lang.Class.getDeclaredConstructor(Class.java:2165) > at akka.util.Reflect$$anonfun$4.apply(Reflect.scala:86) > at akka.util.Reflect$$anonfun$4.apply(Reflect.scala:86) > at scala.util.Try$.apply(Try.scala:161) > at akka.util.Reflect$.findConstructor(Reflect.scala:86) > at akka.actor.NoArgsReflectConstructor.(Props.scala:359) > at akka.actor.IndirectActorProducer$.apply(Props.scala:308) > at akka.actor.Props.producer(Props.scala:176) > at akka.actor.Props.(Props.scala:189) > at akka.actor.Props$.create(Props.scala:99) > at akka.actor.Props$.create(Props.scala:99) > at akka.actor.Props.create(Props.scala) > at org.apache.flink.client.program.ClientTest.shouldSubmitToJobClient(ClientTest.java:143) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:310) > at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:88) > at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:96) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:294) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:127) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:282) > at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:86) > at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:207) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:146) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:120) > at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:33) > at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:45) > at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:118) > at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:104) > at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53) > at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:53) > at org.junit.runner.JUnitCore.run(JUnitCore.java:160) > at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78) > at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212) > at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) > {code} > Affected tests are: {{ClientTest.shouldSubmitToJobClient}}, {{ClientTest.shouldSubmitToJobClientFails}}, {{DataSourceTaskTest}}, {{DataSinkTaskTest}} and {{ChainTaskTest}}. This list, however, is by no means complete. > With the latest java version Java 8u51, the tests pass, though. The problem might be related to https://code.google.com/p/powermock/issues/detail?id=505 and to https://bugs.openjdk.java.net/browse/JDK-8051012 > I propose to either document this fact more prominently or to rewrite the affected tests so that they also run with Java 8u20. -- This message was sent by Atlassian JIRA (v6.3.4#6332)