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

tests.unit.test_flow.TestInstalledAppFlow: test_run_local_server failed #262

Open
flaky-bot bot opened this issue Dec 13, 2022 · 1 comment
Open
Labels
flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Dec 13, 2022

Note: #226 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 0f402db
buildURL: Build Status, Sponge
status: failed

Test output
self = 
webbrowser_mock = 
instance = 
mock_fetch_token = , port = 60434
@pytest.mark.webtest
@mock.patch("google_auth_oauthlib.flow.webbrowser", autospec=True)
def test_run_local_server(self, webbrowser_mock, instance, mock_fetch_token, port):
    auth_redirect_url = urllib.parse.urljoin(
        f"http://localhost:{port}", self.REDIRECT_REQUEST_PATH
    )

    with concurrent.futures.ThreadPoolExecutor(max_workers=1) as pool:
        future = pool.submit(partial(instance.run_local_server, port=port))

        while not future.done():
            try:
                requests.get(auth_redirect_url)
            except requests.ConnectionError:  # pragma: NO COVER
                pass
      credentials = future.result()

tests/unit/test_flow.py:334:


/usr/local/lib/python3.9/concurrent/futures/_base.py:439: in result
return self.__get_result()
/usr/local/lib/python3.9/concurrent/futures/_base.py:391: in __get_result
raise self._exception
/usr/local/lib/python3.9/concurrent/futures/thread.py:58: in run
result = self.fn(*self.args, **self.kwargs)
google_auth_oauthlib/flow.py:499: in run_local_server
local_server = wsgiref.simple_server.make_server(
/usr/local/lib/python3.9/wsgiref/simple_server.py:154: in make_server
server = server_class((host, port), handler_class)
/usr/local/lib/python3.9/socketserver.py:452: in init
self.server_bind()
/usr/local/lib/python3.9/wsgiref/simple_server.py:50: in server_bind
HTTPServer.server_bind(self)
/usr/local/lib/python3.9/http/server.py:136: in server_bind
socketserver.TCPServer.server_bind(self)


self = <wsgiref.simple_server.WSGIServer object at 0x7f15ee2c6be0>

def server_bind(self):
    """Called by constructor to bind the socket.

    May be overridden.

    """
    if self.allow_reuse_address:
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
  self.socket.bind(self.server_address)

E OSError: [Errno 98] Address already in use

/usr/local/lib/python3.9/socketserver.py:466: OSError

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 13, 2022
@flaky-bot
Copy link
Author

flaky-bot bot commented Dec 13, 2022

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (0f402db), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Dec 13, 2022
@westarle westarle added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant