-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add comprehensive test suite for ZIOApp graceful shutdown behavior (Issue #9909) #9971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: series/2.x
Are you sure you want to change the base?
Conversation
This commit implements a test suite for ZIOApp to verify its behavior across different platforms and scenarios, with special focus on graceful shutdown: - Added shared tests for core ZIOApp functionality - Implemented JVM-specific process tests to verify real-world behavior - Created test utilities for spawning and monitoring ZIOApp processes - Added finalizer tests to ensure proper resource cleanup - Added signal handling tests to verify graceful shutdown - Added tests for configurable gracefulShutdownTimeout - Added tests to verify fixes for issues zio#9901, zio#9807, and zio#9240 The test suite is designed to run across all supported platforms (JVM, JS, Native) with appropriate platform-specific test isolation.
…otected installSignalHandlers by creating TestZIOApp helper class- Replace System.getProperty with zio.System.property- Fix nested finalizers test with proper scoping- Eliminate unused parameters by adding methods to use them- Remove unused imports- Ensure proper resource management in tests
- Fixed System.property access in ProcessTestUtils and TestApps - Replaced Runtime.getRuntime with java.lang.Runtime.getRuntime - Added explicit Trace.empty parameters where needed - Fixed type mismatches by adding .orDie to Console effects in release functions - Fixed System.lineSeparator usage with proper trace parameters - Simplified Clock.currentTime usage without TimeUnit parameter - Fixed asserting on nested finalizer tests - Removed unnecessary TestConfig parameter - Fixed runRuntimeUninterruptible calls with proper unsafe Runtime usage - Various minor fixes for unused imports and variables
kindly note that I am new to this and would appreciate any feedback to advance my skills and complete work if possible |
I am sorry for the errors |
…te ZIOAppSpec for idiomatic error handling and test structure
…s files - Fix non-local returns in ProcessTestUtils.sendSignal method - Fix unused parameter warnings in ZIOAppSpec and ProcessTestUtils - Add proper import for ProcessTestUtils in ZIOAppSpec - Remove unused imports in ZIOAppSpec - Add annotation to suppress unused warnings
@kyri-petrou I removed wrong unnecessary comments I made |
@kyri-petrou this is just a heads up |
@kyri-petrou I am ready for a review |
…and race condition detection
@kyri-petrou , just a gentle reminder about this PR. Please let me know if you need anything else from my side. Thank you! |
@kyri-petrou could you please review my pr? |
This PR implements a test suite for ZIOApp that verifies proper finalizer execution and graceful shutdown behavior. It includes:
Fixes #9909, addressing the issues identified in #9901, #9807, and #9240.
/claim #9909