...
- Make sure the code compiles and all tests pass.
- If the pull request changes any POM.xml file: Please either clean your local maven repository before testing OR wait for the build servers to confirm that the project builds. This is to avoid situations in which an artifact was renamed or removed but is still in your local maven repository.
Test java code
At REEF root folder
Code Block title Run Java Tests mvn clean install
Test .Net code
To run tests in command line, go to folder $REEFSourcePath\lang\cs\ and build the projects with the command line:
Code Block title Build .Net source code in debug mode msbuild Org.Apache.REEF.sln
Where $REEFSourcePath is REEF source code root folder.
Then run xUnit and mstest tests for each *.Tests.dll. One possible script to do this is:
Code Block title Run .Net Tests from command line (Powershell script)using msbuild msbuild TestRunner.proj$REEFSourcePath = "C:\reef" function Test-REEF-NET-xunit{ Push-Location "$REEFSourcePath\lang\cs" $exe = ".\packages\xunit.runner.console.2.1.0\tools\xunit.console.exe" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.Tang.Tests\Org.Apache.REEF.Tang.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.Client.Tests\Org.Apache.REEF.Client.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.Wake.Tests\Org.Apache.REEF.Wake.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.Tests\Org.Apache.REEF.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.Common.Tests\Org.Apache.REEF.Common.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.Network.Tests\Org.Apache.REEF.Network.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.IMRU.Tests\Org.Apache.REEF.IMRU.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.Evaluator.Tests\Org.Apache.REEF.Evaluator.Tests.dll" Invoke-Expression "$($exe) $($REEFSourcePath)\lang\cs\bin\x64\Debug\Org.Apache.REEF.IO.Tests\Org.Apache.REEF.IO.Tests.dll" Pop-Location }
Alternatively, open $REEFSourcePath\lang\cs\Org.Apache.REEF.sln in VS, rebuild entire solution, then run all tests in Test explore.
If the code touches code that you suspect might break on YARN or Mesos, please test on those environments. If you don't have access to a test environment, ask on the mailing list for help.
Make sure the code adheres to our coding guidelines.
Make sure that the additions don't create errors in a Apache RAT check via
mvn apache-rat:check
...