Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Incompatible change
-
Description
Currently there is not a clean way for subclasses of ClusterMapReduceTestCase to add to the JobConf used to start the cluster daemons.
The startCluster() method does take a Properties object that is added to the JobConf used to the start the daemons. However, startCluster() is called from JUnit inside the setUp() method, which sets this parameter to be null.
If you try to override setUp() in a subclass of ClusterMapReduceTestCase, then you won't be able to invoke the TestCase.setUp() ancestor without calling ClusterMapReduceTestCase's setUp() (which will pass in the null parameter). On the other hand, if you just call startCluster() within your test method, then you would be starting up a cluster that was already started.