Skip to content

test_integration_cluster.rb: not expected replies #2209

Closed
@junaruga

Description

@junaruga

Describe the bug

A clear and concise description of what the bug is.

I am maintaining puma's RPM package on Fedora project. I am trying to pass the tests on the project's build environment.

Following 4 tests in test_integration_cluster.rb sometimes fail.

  1. test_term_closes_listeners_tcp calling term_closes_listeners method.
  2. test_term_closes_listeners_unix calling term_closes_listeners method.
  3. test_usr1_all_respond_tcp calling usr1_all_respond method.
  4. test_usr1_all_respond_unix calling usr1_all_respond method.
  7) Failure: 
TestIntegrationCluster#test_term_closes_listeners_tcp [/builddir/build/BUILD/puma-4.3.3/usr/share/gems/gems/puma-4.3.3/test/test_integration_cluster.rb:181]:
7 successes, 6 resets, 27 refused, failures 0.
Expected 9 to be <= 7.
  8) Failure:
TestIntegrationCluster#test_term_closes_listeners_unix [/builddir/build/BUILD/puma-4.3.3/usr/share/gems/gems/puma-4.3.3/test/test_integration_cluster.rb:181]:
8 successes, 0 resets, 32 refused, failures 0.
Expected 9 to be <= 8.
  9) Failure:
TestIntegrationCluster#test_usr1_all_respond_tcp [/builddir/build/BUILD/puma-4.3.1/usr/share/gems/gems/puma-4.3.1/test/test_integration_cluster.rb:237]:
25 responses, 2 uniq pids.
Expected 2 to be > 2.
  8) Failure:
TestIntegrationCluster#test_usr1_all_respond_unix [/builddir/build/BUILD/puma-4.3.3/usr/share/gems/gems/puma-4.3.3/test/test_integration_cluster.rb:240]:
25 responses, 2 uniq pids.
Expected 2 to be > 2.

Do you have any idea to adjust the parameter values such as the thread number or sleep time in the 2 actual methods term_closes_listeners and usr1_all_respond to pass the 4 tests?
Thank you.

Puma config:

Please copy-paste your Puma config AND your command line options here.

It's not a target for this issue.

To Reproduce

Please add reproduction steps here.

  1. Run the puma unit test on Fedora project system several times. It might be happen on a low performance environment. It does not happen on my local environment.

Your issue will be solved very quickly if you can reproduce it with a "hello world" rack application. To do this, copy this into a file called hello.ru:
...
There is also a Dockerfile available for reproducing Linux-specific issues. To use:
...
This will help you to create a container that reproduces your issue.

If I can reproduce it on local, I have a will to work for that.

Expected behavior

A clear and concise description of what you expected to happen.

Following 4 tests always pass.

  1. test_term_closes_listeners_tcp
  2. test_term_closes_listeners_unix
  3. test_usr1_all_respond_tcp
  4. test_usr1_all_respond_unix

Desktop (please complete the following information):

  • OS: Linux Fedora chroot environment. I observed it on the CPU architecture x86_64, aarch64, ppc64le or s390x environment.

  • Puma Version: 4.3.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions