I want to use multiple external resources in my test class, but I have a problem with ordering of external resources.
Here is code snippet :
public class TestPigExternalResource {
// hadoop external resource, this should start first
@Rule
public HadoopSingleNodeCluster cluster = new HadoopSingleNodeCluster();
// pig external resourcem, this should wait until hadoop external resource starts
@Rule
public PigExternalResource pigExternalResource = new PigExternalResource();
...
}
The problem is it tries to start pig before hadoop started, therefore I could not connect local hadoop single node cluster.
Is there any way to order rules of junit?
thanks
HadoopSingleNodeCluster
class publicly available? As i useorg.apache.hadoop.mapred.ClusterMapReduceTestCase
, but it's not that stable. – Grishilde