Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vaurienclient.Client doesn't seem to set behavior correctly. #31

Open
mwhooker opened this issue Dec 17, 2013 · 1 comment
Open

vaurienclient.Client doesn't seem to set behavior correctly. #31

mwhooker opened this issue Dec 17, 2013 · 1 comment

Comments

@mwhooker
Copy link
Contributor

Setting warmup or inject doesn't update the Error handler's settings.

def test_aws_transient(self):
        """Tests that we retry requests."""
        self._setup_proxy()
        client = VClient()
        options = {'inject': True, 'warmup': 2}

        with client.with_behavior('error', **options):
            # do something...
            result = self._query_ns()
            self._test_result(result)

the odd thing is I can print the settings in the OnTheFlyProxy and at the beginning of Error.on_before_handle. The id method shows the same value for both objects, but only the print in OnTheFlyProxy shows my options being set. Error.on_before_handle just shows my default options.

any ideas?

edit:

here's the _setup_proxy method

def _setup_proxy(self, protocol='http'):
        self.proxy_pid = start_proxy(
            protocol=protocol,
            proxy_port=8000,
            backend_host=boto.ec2.RegionData['us-west-1'],
            backend_port=80,
            options=[
                '--protocol-tcp-reuse-socket',
                '--protocol-tcp-keep-alive'
            ]
        )
        assert self.proxy_pid is not None
@mwhooker
Copy link
Contributor Author

Looks like DefaultProxy.weirdify is overwriting the settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant