HomePhorge

When shutting down Mongrel, wait synchronously for stop.
cea48e24be76Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

When shutting down Mongrel, wait synchronously for stop.

The Mongrel tests on Ruby 1.9 were highly unreliable, sometimes failing
because they tried to bind a port that was already in use.

This turns out to be because the default shutdown mode is to asynchronously
stop workers - combined with the fact that our test made a TCP connection to
the service, but never actually completed the request.

That led to one thread that dangled, if the socket didn't close in a timely
fashion, and blocked up the listen port.

Instead, two things: first, wait for all threads to terminate (or 60 seconds
to pass) in the stop method, and second, use a full HTTP request to test, not
just a TCP connection with no content.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUea0dd1483fc2: Implement YAML 1.1 binary data encoding in ZAML
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUcea48e24be76: When shutting down Mongrel, wait synchronously for stop. (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 30 2012, 9:15 PM