# Path: pgctl/subprocess.py
# def set_defaults(func, **defaults):
#     def wrapped(cmd, **kwargs):
# PIPE = subprocess.PIPE
# STDOUT = subprocess.STDOUT


import time
import pytest
from pgctl.subprocess import check_call



pytestmark = pytest.mark.usefixtures('in_example_dir')
SLOW_STARTUP_TIME = 6


@pytest.fixture
def service_name():
    yield 'poll-ready-quick-shutdown'


def it_stops_quickly():
    """Tests a regression in pgctl where services using pgctl-poll-ready fail to
    stop because the background process started by pgctl-poll-ready isn't dying
    quickly."""

# Path: pgctl/subprocess.py
# def set_defaults(func, **defaults):
#     def wrapped(cmd, **kwargs):
# PIPE = subprocess.PIPE
# STDOUT = subprocess.STDOUT


# Path: tests/spec/poll_ready_quick_shutdown.py
import time
import pytest
from pgctl.subprocess import check_call




pytestmark = pytest.mark.usefixtures('in_example_dir')
SLOW_STARTUP_TIME = 6


@pytest.fixture
def service_name():
    yield 'poll-ready-quick-shutdown'


def it_stops_quickly():
    """Tests a regression in pgctl where services using pgctl-poll-ready fail to
    stop because the background process started by pgctl-poll-ready isn't dying
    quickly."""

    check_call(('pgctl', 'start'))