Dear Wiki user, You have subscribed to a wiki page or wiki category on "Pig Wiki" for change notification.
The following page has been changed by XuZhang: http://wiki.apache.org/pig/HowToContribute ------------------------------------------------------------------------------ * Contributions should pass existing unit tests. * New unit tests should be provided to demonstrate bugs and fixes. [http://www.junit.org/ JUnit] is our test framework: * You must implement a class that extends `junit.framework.TestCase` and whose class name contains `Test`. - * If an `HDFS` cluster and/or a `MapReduce` cluster is needed by your test, add a field of type `MiniCluster` to the class and initialize it with a statement like the following (the name of the field is not important). `TestAlgebraicEval.java` is an example of a test that uses cluster. + * If an `HDFS` cluster and/or a `MapReduce` cluster is needed by your test, add a field of type `MiniCluster` to the class and initialize it with a statement like the following (the name of the field is not important). `TestAlgebraicEval.java` is an example of a test that uses cluster. The test will then run on a cluster created on the local machine. `MiniCluster cluster = MiniCluster.buildCluster();` * Define methods within your class and annotate it with [EMAIL PROTECTED], and call JUnit's many assert methods to verify conditions; these methods will be executed when you run `ant test`. * Place your class in the `test` tree. * you can then run all the unit test with the command `ant test`. Similarly, you can run a specific unit test with the command `ant test -Dtestcase=<ClassName>` (For example `ant test -Dtestcase=TestPigFile`) - == Generating a patch == === Compilation === Make sure that your code introduces no new warnings into the javac compilation.