Skip to content

Unicorn worker termination tests

What does this MR do?

Add tests for Unicorn worker termination in a production-like situation. We create a unicorn configuration based on config/unicorn.rb.example (the production configuration template) and test whether workers shut down correctly when signalled.

Are there points in the code the reviewer needs to double check?

Manipulation of WebMock settings: I had trouble getting this right and it affects other tests.

Why was this MR needed?

We recently had a problem where a C extension of a Ruby gem ('grpc' 1.2.2 in this case) was interfering with Unicorn worker termination, leading to memory exhaustion.

I have verified that grpc 1.2.2 fails these new tests.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/31143

Merge request reports