diff --git a/state/linklayerdevices_test.go b/state/linklayerdevices_test.go
index <HASH>..<HASH> 100644
--- a/state/linklayerdevices_test.go
+++ b/state/linklayerdevices_test.go
@@ -523,8 +523,12 @@ func (s *linkLayerDevicesStateSuite) TestMachineAllLinkLayerDevicesOnlyReturnsSa
 	results, err := s.machine.AllLinkLayerDevices()
 	c.Assert(err, jc.ErrorIsNil)
 	c.Assert(results, gc.HasLen, 2)
-	c.Assert(results[0].Name(), gc.Equals, "foo")
-	c.Assert(results[1].Name(), gc.Equals, "foo.42")
+
+	deviceNames := make([]string, 2)
+	for i, res := range results {
+		deviceNames[i] = res.Name()
+	}
+	c.Assert(deviceNames, jc.SameContents, []string{"foo", "foo.42"})
 
 	s.assertNoDevicesOnMachine(c, s.otherStateMachine)
 }
Fixes transient error in testing link-layer devices by doing an order
agnostic comparison.