I did some additional testing myself and I now have the "smallest possible" way to reproduce the effect I see.
I was able to reproduce the problem I'm facing by simply trying to run an existing unit test from pig without modification of the code at all. https://github.com/nielsbasjes/pig-loader-testing So what I did: Create a very simple pom.xml Download https://raw.githubusercontent.com/apache/pig/branch-0.13/test/org/apache/pig/builtin/mock/TestMockStorage.java and put it in the right directory. Now when you run mvn test I see: java.lang.RuntimeException: No data for location 'bar' > at org.apache.pig.builtin.mock.Storage$Data.get(Storage.java:327) > at > org.apache.pig.builtin.mock.TestMockStorage.testMockStoreAndLoad(TestMockStorage.java:55) and junit.framework.AssertionFailedError: > Expected :{a: chararray,b: chararray} > Actual :null and java.lang.RuntimeException: No data for location 'output' > at org.apache.pig.builtin.mock.Storage$Data.get(Storage.java:327) > at > org.apache.pig.builtin.mock.TestMockStorage.testMockStoreUnion(TestMockStorage.java:106) Any help suggestions to what I'm doing wrong is very welcome. Niels Basjes On Sun, Nov 23, 2014 at 12:29 AM, Niels Basjes <ni...@basjes.nl> wrote: > Hi, > > I have written a Pig Loader and I want to make unit tests for it that > actually use it from Pig. > > It's a Maven project and as a first attempt I created a testing class and > tried to create a java based unit test by doing something similar to this: > > https://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/builtin/mock/TestMockStorage.java > > I couldn't get it to work so I copied the exact method > testMockStoreAndLoad and I still get this error: > *java.lang.RuntimeException: No data for location 'bar'* > > Does anyone have a suggestion on how to proceed? > > -- > Best regards > > Niels Basjes > -- Best regards / Met vriendelijke groeten, Niels Basjes