kirklund opened a new pull request, #7758:
URL: https://github.com/apache/geode/pull/7758

   GEODE-10327: Overhaul GfshRule to kill processes and save artifacts (#7731)
   
   PROBLEM
   
   Tests that use GfshRule leave behind orphaned processes and do not save
   artifacts for debugging failures.
   
   SOLUTION
   
   GfshRule needs to cleanup all processes it forks. It also needs to save
   off all runtime artifacts such as logging, stats, pid files, diskstores
   to enable debugging of test failures.
   
   DETAILS
   
   Enhance GfshRule and modify all tests using it for proper debugging and
   to prevent test pollution.
   
   Overhaul of GfshRule:
   
   * kill ALL geode processes during cleanup
   * use FolderRule to ensure all logs and files are properly saved off
   when a test fails
   * extract GfshExecutor from JUnit rule code
   * GfshExecutor allows a test to use any number of Geode versions with
   just one GfshRule
   * add Gfsh log level support for easier debugging
   * add support for new VmConfiguration to allow control over Geode and
   Java versions
   * overhaul API of GfshRule and companion classes for better consistency
   and design
   
   New FolderRule:
   
   * replaces TemporaryFolder and saves off all content when a test fails
   * creates root directory under the gradle worker instead of under temp
   
   Update HTTP session caching module tests:
   
   * use new FolderRule to save all artifacts when a test fails
   * use nio Paths for filesystem variables
   
   Update acceptance and upgrade tests that use GfshRule:
   
   * use new improved GfshRule and GfshExecutor
   * use new FolderRule instead of TemporaryFolder to save all artifacts
   when a test fails
   * use --disable-default-server in tests with no clients
   * fix flakiness of many tests by using random ports instead of default
   or hardcoded port values
   * reformat GfshRule API usage in tests to improve readability and
   consistency
   * add GfshStopper to provide common place to await process stop (stop
   locator/server is async so restarting with same ports is very prone
   to hitting BindExceptions)
   
   Update ProcessUtils:
   
   * extract NativeProcessUtils and make it public for direct use
   * rename InternalProcessUtils as ProcessUtilsProvider and move to its
   own class
   * rethrow IOExceptions as UncheckedIOExceptions
   * fix flakiness in NativeProcessUtilsTest by moving findAvailablePid
   into test method
   
   Minor changes:
   
   * improve code formatting and readability
   * convert from old io File to nio Path APIs as much as possible
   * close output streams to fix filesystem issues on Windows
   
   Fixes flaky test tickets:
   
   * DeployJarAcceptanceTest GEODE-9615
   * possibly other tests that uses GfshRule
   
   Changes for resubmit:
   
   * log error message if unable to delete folder
   
   NOTES
   
   The jdk8, jdk17 and windows labels were used to run tests on more
   environments.
   
   This PR contains mostly test and framework changes. The only product
   code altered is ServerLauncher and several classes in
   org.apache.geode.internal.process, all of which is in geode-core.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to