Skip to content

test: add SIGTERM delay tests for shell, Java, and Go processes#160

Closed
vlsi wants to merge 1 commit intoNetcracker:mainfrom
vlsi:test/sigterm-delay-tests
Closed

test: add SIGTERM delay tests for shell, Java, and Go processes#160
vlsi wants to merge 1 commit intoNetcracker:mainfrom
vlsi:test/sigterm-delay-tests

Conversation

@vlsi
Copy link
Copy Markdown
Contributor

@vlsi vlsi commented Mar 23, 2026

Verify that the entrypoint's SIGTERM_EXIT_DELAY mechanism works correctly by asserting console output.

Each child process prints a "delayed message" after 5 seconds;

  • with delay=0 the message is absent (child killed before printing),
  • with delay=8 it is present (child alive during the delay window).

@vlsi vlsi requested a review from lis0x90 as a code owner March 23, 2026 05:42
@lis0x90
Copy link
Copy Markdown
Member

lis0x90 commented Mar 26, 2026

@vlsi I'm curious, why not just extend existing test for signal propagation https://github.com/Netcracker/qubership-core-base-images/tree/main/tests/signal-propagation?

@vlsi
Copy link
Copy Markdown
Contributor Author

vlsi commented Mar 26, 2026

  1. The existing test deliberately avoids SIGTERM (
    # use SIGUSR1 to avoid sleeping 10 seconds in entrypoint trap handler for SIGTERM
    ). The new test is specifically about exercising that avoided path.
  2. Different structure — sigterm-delay runs two containers per process type (delay=0 vs delay=8) and tests three child process types (shell, Java, Go), making it significantly heavier (~30s vs ~5s).
  3. Different concern — signal-propagation checks that signals reach the child and exit codes propagate. sigterm-delay checks that the delay mechanism keeps the child alive during the grace period.

Do you still think it is worth merging the tests?

Frankly, I am leaning towards keeping two independent tests as they would be easier to review/understand/maintain/drop in the future.

Verify that the entrypoint's SIGTERM_EXIT_DELAY mechanism works correctly
by asserting console output rather than wall-clock timing. Each child
process prints a "delayed message" after 5 seconds; with delay=0 the
message is absent (child killed before printing), with delay=8 it is
present (child alive during the delay window).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vlsi vlsi force-pushed the test/sigterm-delay-tests branch from 23c79da to f7fbc29 Compare March 26, 2026 08:32
@vlsi

This comment was marked as off-topic.

@vlsi vlsi closed this Apr 1, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 1, 2026
@vlsi vlsi deleted the test/sigterm-delay-tests branch April 1, 2026 15:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants