As seen in
http://reports.vapour.ws/releases/issue/57236866749a5631dd9859a3
MigrationExportSuite.TestUnits unequal results in windows using go 1.6
migration_export_test.go:102:
c.Check(st.Data(), jc.DeepEquals, map[string]interface{}{"index": i + 1})
... obtained map[string]interface {} = map[string]interface {}{"index":4}
... expected map[string]interface {} = map[string]interface {}{"index":1}
... mismatch at ["index"]: unequal; obtained 4; expected 1
migration_export_test.go:223:
s.checkStatusHistory(c, history[:addedHistoryCount], status.StatusStarted)
migration_export_test.go:102:
c.Check(st.Data(), jc.DeepEquals, map[string]interface{}{"index": i + 1})
... obtained map[string]interface {} = map[string]interface {}{"index":3}
... expected map[string]interface {} = map[string]interface {}{"index":2}
... mismatch at ["index"]: unequal; obtained 3; expected 2
migration_export_test.go:223:
s.checkStatusHistory(c, history[:addedHistoryCount], status.StatusStarted)
migration_export_test.go:102:
c.Check(st.Data(), jc.DeepEquals, map[string]interface{}{"index": i + 1})
... obtained map[string]interface {} = map[string]interface {}{"index":2}
... expected map[string]interface {} = map[string]interface {}{"index":3}
... mismatch at ["index"]: unequal; obtained 2; expected 3
migration_export_test.go:223:
s.checkStatusHistory(c, history[:addedHistoryCount], status.StatusStarted)
migration_export_test.go:102:
c.Check(st.Data(), jc.DeepEquals, map[string]interface{}{"index": i + 1})
... obtained map[string]interface {} = map[string]interface {}{"index":1}
... expected map[string]interface {} = map[string]interface {}{"index":4}
... mismatch at ["index"]: unequal; obtained 1; expected 4
The three failing tests are
MigrationExportSuite.TestUnits
MigrationExportSuite.TestMachines
MigrationExportSuite.TestServices
Thus far I see a number of possibilities here:
1. the timestamps on the status entries do not align with the order with which they were originally added by the test
2. mgo's Query.Sort() is not getting the order right
3. mgo's Query.Iter() is not preserving the order correctly
4. slice iteration is not preserving order correctly
None of those seem likely, so I'm probably missing something.