You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mrunit.apache.org by Harsh Sarin <h....@gmail.com> on 2016/06/04 21:54:56 UTC

[Error] Java.lang.verifyerror after upgrading to v1.1.0

Hi,

I upgraded the MRUnit version to 1.1.0 in my project, to use the
ReduceDriver for testing multiple outputs. After making changes to my test
(to make it work with the upgrade), I get this error:

*java.lang.VerifyError: Expecting a stackmap frame at branch target 63*
Exception Details:
Location: (path to test class)
Reason: Expected stackmap frame at this location.
Bytecode: (Bytecode)

My test looks like this (have deliberately removed code to make this more
concise):

@RunWith(PowerMockRunner.class)
@PrepareForTest({ MultipleOutputs.class, myReducer.class })
public class myReducerTest {
    private ReduceDriver<Text, Text, Text, Text> reduceDriver;

    @Before
    public void setUp() {
        reduceDriver = ReduceDriver.newReduceDriver(myReducer());
    }

    @Test
    public void testHappyPath() throws IOException {
        /*
              Code to declare input key, inout value, expected output, etc.
        */

        reduceDriver.withInput(myInputKey, myInputVal);
        reduceDriver.withMultiOutput("reportName1", key, expectedValue1);
        reduceDriver.withMultiOutput("reportName2", key, expectedValue2);
        reduceDriver.runTest();
    }
}

I think I am missing something while upgrading MRUnit. Part of my pom file
(I am using maven for building) looks like this:

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-easymock</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.mrunit</groupId>
            <artifactId>mrunit</artifactId>
            <version>1.1.0</version>
            <classifier>hadoop2</classifier>
            <scope>test</scope>
        </dependency>

Thank you.

Regards,
Harsh.