<div dir="ltr">Is it possible the data is accidentally mutable and being updated asynchronously? Such that at the time the initial comparison is made the value is actually false, but by the time we notice the mismatch and report on it the data has been updated and they are now the same? Bad test to share mutable state between threads/goroutines, though it might be uncovering a deeper shared state problem?<div><br></div><div>Or its just something equally weird where we get NaN != NaN, but true != true would certainly be very odd.</div><div><br></div><div>John</div><div>=:-></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 6, 2015 at 3:35 AM, Tim Penhey <span dir="ltr"><<a href="mailto:tim.penhey@canonical.com" target="_blank">tim.penhey@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This morning I noticed a Curse on the jes-cli branch, which included<br>
this one on ppc64el:<br>
<br>
<a href="http://reports.vapour.ws/releases/2855/job/run-unit-tests-trusty-ppc64el/attempt/3487" rel="noreferrer" target="_blank">http://reports.vapour.ws/releases/2855/job/run-unit-tests-trusty-ppc64el/attempt/3487</a><br>
<br>
<br>
Upon looking I saw this:<br>
<br>
storage_test.go:147:<br>
    c.Assert(info, jc.DeepEquals, expect)<br>
... obtained state.FilesystemAttachmentInfo =<br>
state.FilesystemAttachmentInfo{MountPoint:"", ReadOnly:true}<br>
... expected state.FilesystemAttachmentInfo =<br>
state.FilesystemAttachmentInfo{MountPoint:"", ReadOnly:true}<br>
... mismatch at .ReadOnly: unequal; obtained true; expected true<br>
<br>
<br>
um... wat?<br>
<br>
from state/filesystem.go:<br>
<br>
type FilesystemAttachmentInfo struct {<br>
        // MountPoint is the path at which the filesystem is mounted on the<br>
        // machine. MountPoint may be empty, meaning that the filesystem is<br>
        // not mounted yet.<br>
        MountPoint string `bson:"mountpoint"`<br>
        ReadOnly   bool   `bson:"read-only"`<br>
}<br>
<br>
<br>
So we have a plain struct with a string and a bool.  How can<br>
jc.DeepEquals fail with this?<br>
<br>
Confusedly yours,<br>
Tim<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</font></span></blockquote></div><br></div>