intermittent failure apiclientSuite.TestOpenTimesOutOnLogin

Bug #1755142 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
John A Meinel
2.3
Fix Released
High
John A Meinel

Bug Description

As seen here:
http://10.125.0.203:8080/job/RunUnittests-race-amd64/176/console

github.com/juju/juju/api
FAIL: apiclient_test.go:770: apiclientSuite.TestOpenTimesOutOnLogin

[LOG] 0:05.024 DEBUG juju.api error dialing websocket: dial tcp 127.0.0.1:37180: context deadline exceeded
apiclient_test.go:797:
    c.Assert(err, gc.ErrorMatches, `cannot log in: context deadline exceeded`)
... error string = "unable to connect to API: dial tcp 127.0.0.1:37180: context deadline exceeded"
... regex string = "cannot log in: context deadline exceeded"

Oddly, we see this before the test info:
=== RUN TestAll
2018/03/12 11:00:27 http: TLS handshake error from 127.0.0.1:48562: EOF

I wonder if the context deadline we are setting is sometimes so short that the TLS handshake fails first, and then we get cut off before we even get to Log In which is why we get a failure to "connect to API" rather than a failure "cannot log in".

I'll check if the code actually cares, or if we can just look for either message.

Note, this *particular* instance of the failure is under "-race" but probably that just changes the timing to make it more possible.

John A Meinel (jameinel)
description: updated
John A Meinel (jameinel)
Changed in juju:
milestone: none → 2.4-beta1
Revision history for this message
John A Meinel (jameinel) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.