diff --git a/terraform/context_test.go b/terraform/context_test.go
index <HASH>..<HASH> 100644
--- a/terraform/context_test.go
+++ b/terraform/context_test.go
@@ -1579,6 +1579,8 @@ func TestContext2Refresh_targetedCount(t *testing.T) {
 		"aws_instance.me.1",
 		"aws_instance.me.2",
 	}
+	sort.Strings(expected)
+	sort.Strings(refreshedResources)
 	if !reflect.DeepEqual(refreshedResources, expected) {
 		t.Fatalf("expected: %#v, got: %#v", expected, refreshedResources)
 	}
core: [tests] fix order dependent test