From da6a4bfa3fd277e4d0669d168447736664a5dd82 Mon Sep 17 00:00:00 2001 From: Kevin Gosse Date: Fri, 15 Nov 2024 11:15:43 +0100 Subject: [PATCH] Add delays --- .../docker/dotnet/dd-lib-dotnet-init-test-app/Program.cs | 2 +- lib-injection/build/docker/nodejs/sample-app-node13/child.js | 4 ++-- lib-injection/build/docker/nodejs/sample-app/child.js | 4 ++-- .../python/dd-lib-python-init-test-django/django_app.py | 2 +- tests/auto_inject/test_auto_inject_install.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib-injection/build/docker/dotnet/dd-lib-dotnet-init-test-app/Program.cs b/lib-injection/build/docker/dotnet/dd-lib-dotnet-init-test-app/Program.cs index 7440241caf..84ddc26179 100644 --- a/lib-injection/build/docker/dotnet/dd-lib-dotnet-init-test-app/Program.cs +++ b/lib-injection/build/docker/dotnet/dd-lib-dotnet-init-test-app/Program.cs @@ -4,7 +4,7 @@ { var thread = new Thread(() => { - Thread.Sleep(5000); // Add a small delay otherwise the injector leaves a zombie process behind :( + Thread.Sleep(10_000); // Add a small delay otherwise the telemetry forwarder leaves a zombie process behind throw new BadImageFormatException("Expected"); }); diff --git a/lib-injection/build/docker/nodejs/sample-app-node13/child.js b/lib-injection/build/docker/nodejs/sample-app-node13/child.js index e0043b37d3..dc31b76887 100644 --- a/lib-injection/build/docker/nodejs/sample-app-node13/child.js +++ b/lib-injection/build/docker/nodejs/sample-app-node13/child.js @@ -1,6 +1,6 @@ console.log('Child process started'); setTimeout(() => { - console.log('Child process exiting after 5 seconds'); + console.log('Child process exiting after 10 seconds'); process.kill(process.pid, 'SIGSEGV'); -}, 5000); +}, 10000); // Add a delay before crashing otherwise the telemetry forwarder leaves a zombie behind diff --git a/lib-injection/build/docker/nodejs/sample-app/child.js b/lib-injection/build/docker/nodejs/sample-app/child.js index e0043b37d3..dc31b76887 100644 --- a/lib-injection/build/docker/nodejs/sample-app/child.js +++ b/lib-injection/build/docker/nodejs/sample-app/child.js @@ -1,6 +1,6 @@ console.log('Child process started'); setTimeout(() => { - console.log('Child process exiting after 5 seconds'); + console.log('Child process exiting after 10 seconds'); process.kill(process.pid, 'SIGSEGV'); -}, 5000); +}, 10000); // Add a delay before crashing otherwise the telemetry forwarder leaves a zombie behind diff --git a/lib-injection/build/docker/python/dd-lib-python-init-test-django/django_app.py b/lib-injection/build/docker/python/dd-lib-python-init-test-django/django_app.py index c86251836a..40daf5479a 100644 --- a/lib-injection/build/docker/python/dd-lib-python-init-test-django/django_app.py +++ b/lib-injection/build/docker/python/dd-lib-python-init-test-django/django_app.py @@ -40,7 +40,7 @@ def fork_and_crash(request): return HttpResponse(f"Child process {pid} exited with status {status}") elif pid == 0: # Child process - time.sleep(5) # don't crash immediately or the injector leaves a zombie behind + time.sleep(10) # don't crash immediately or the telemetry forwarder leaves a zombie behind crashme(request) return HttpResponse("Nobody should see this") diff --git a/tests/auto_inject/test_auto_inject_install.py b/tests/auto_inject/test_auto_inject_install.py index ad948ae3ad..5049bafc38 100644 --- a/tests/auto_inject/test_auto_inject_install.py +++ b/tests/auto_inject/test_auto_inject_install.py @@ -82,7 +82,7 @@ def test_profiling(self, virtual_machine): class TestContainerAutoInjectInstallScriptCrashTracking_NoZombieProcess(base.AutoInjectBaseTest): @parametrize_virtual_machines( bugs=[ - {"weblog_variant": "test-app-ruby", "reason": "APMLP-312"}, + {"library": "ruby", "reason": "APMLP-312"}, {"weblog_variant": "test-app-java-buildpack", "reason": "APMON-1595"}, ] )