Browse Source

bug: remove invalid test

I'm not sure what the purpose of
`TestClusterAdminCreateTopicWithDiffVersion` originally was, but rather
than testing desired behaviour, it seemed to be asserting that a
previous deficiency in the mockbroker responses would return an
ErrInsufficientData because a V1 request got a V0 response from the
mockbroker. Since ec2cbc3 the mockbroker responses with a matching
response version to the original request, so this test would no longer
pass its assertions and should be removed.
Dominic Evans 6 years ago
parent
commit
e581f69e63
1 changed files with 0 additions and 29 deletions
  1. 0 29
      admin_test.go

+ 0 - 29
admin_test.go

@@ -136,35 +136,6 @@ func TestClusterAdminCreateTopicWithoutAuthorization(t *testing.T) {
 	}
 	}
 }
 }
 
 
-func TestClusterAdminCreateTopicWithDiffVersion(t *testing.T) {
-	seedBroker := NewMockBroker(t, 1)
-	defer seedBroker.Close()
-
-	seedBroker.SetHandlerByMap(map[string]MockResponse{
-		"MetadataRequest": NewMockMetadataResponse(t).
-			SetController(seedBroker.BrokerID()).
-			SetBroker(seedBroker.Addr(), seedBroker.BrokerID()),
-		"CreateTopicsRequest": NewMockCreateTopicsResponse(t),
-	})
-
-	config := NewConfig()
-	config.Version = V0_11_0_0
-	admin, err := NewClusterAdmin([]string{seedBroker.Addr()}, config)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	err = admin.CreateTopic("my_topic", &TopicDetail{NumPartitions: 1, ReplicationFactor: 1}, false)
-	if err != ErrInsufficientData {
-		t.Fatal(err)
-	}
-
-	err = admin.Close()
-	if err != nil {
-		t.Fatal(err)
-	}
-}
-
 func TestClusterAdminListTopics(t *testing.T) {
 func TestClusterAdminListTopics(t *testing.T) {
 	seedBroker := NewMockBroker(t, 1)
 	seedBroker := NewMockBroker(t, 1)
 	defer seedBroker.Close()
 	defer seedBroker.Close()