@@ -46,7 +46,7 @@ func TestHTTPpub(t *testing.T) {
4646 defer nsqd .Exit ()
4747
4848 topicName := "test_http_pub" + strconv .Itoa (int (time .Now ().Unix ()))
49- topic := nsqd .GetOrCreateTopic (topicName )
49+ topic , _ := nsqd .GetOrCreateTopic (topicName )
5050
5151 buf := bytes .NewBuffer ([]byte ("test message" ))
5252 url := fmt .Sprintf ("http://%s/pub?topic=%s" , httpAddr , topicName )
@@ -69,7 +69,7 @@ func TestHTTPpubEmpty(t *testing.T) {
6969 defer nsqd .Exit ()
7070
7171 topicName := "test_http_pub_empty" + strconv .Itoa (int (time .Now ().Unix ()))
72- topic := nsqd .GetOrCreateTopic (topicName )
72+ topic , _ := nsqd .GetOrCreateTopic (topicName )
7373
7474 buf := bytes .NewBuffer ([]byte ("" ))
7575 url := fmt .Sprintf ("http://%s/pub?topic=%s" , httpAddr , topicName )
@@ -93,7 +93,7 @@ func TestHTTPmpub(t *testing.T) {
9393 defer nsqd .Exit ()
9494
9595 topicName := "test_http_mpub" + strconv .Itoa (int (time .Now ().Unix ()))
96- topic := nsqd .GetOrCreateTopic (topicName )
96+ topic , _ := nsqd .GetOrCreateTopic (topicName )
9797
9898 msg := []byte ("test message" )
9999 msgs := make ([][]byte , 4 )
@@ -122,7 +122,7 @@ func TestHTTPmpubEmpty(t *testing.T) {
122122 defer nsqd .Exit ()
123123
124124 topicName := "test_http_mpub_empty" + strconv .Itoa (int (time .Now ().Unix ()))
125- topic := nsqd .GetOrCreateTopic (topicName )
125+ topic , _ := nsqd .GetOrCreateTopic (topicName )
126126
127127 msg := []byte ("test message" )
128128 msgs := make ([][]byte , 4 )
@@ -153,7 +153,7 @@ func TestHTTPmpubBinary(t *testing.T) {
153153 defer nsqd .Exit ()
154154
155155 topicName := "test_http_mpub_bin" + strconv .Itoa (int (time .Now ().Unix ()))
156- topic := nsqd .GetOrCreateTopic (topicName )
156+ topic , _ := nsqd .GetOrCreateTopic (topicName )
157157
158158 mpub := make ([][]byte , 5 )
159159 for i := range mpub {
@@ -182,7 +182,7 @@ func TestHTTPmpubForNonNormalizedBinaryParam(t *testing.T) {
182182 defer nsqd .Exit ()
183183
184184 topicName := "test_http_mpub_bin" + strconv .Itoa (int (time .Now ().Unix ()))
185- topic := nsqd .GetOrCreateTopic (topicName )
185+ topic , _ := nsqd .GetOrCreateTopic (topicName )
186186
187187 mpub := make ([][]byte , 5 )
188188 for i := range mpub {
@@ -211,8 +211,8 @@ func TestHTTPpubDefer(t *testing.T) {
211211 defer nsqd .Exit ()
212212
213213 topicName := "test_http_pub_defer" + strconv .Itoa (int (time .Now ().Unix ()))
214- topic := nsqd .GetOrCreateTopic (topicName )
215- ch := topic .GetOrCreateChannel ("ch" )
214+ topic , _ := nsqd .GetOrCreateTopic (topicName )
215+ ch , _ := topic .GetOrCreateChannel ("ch" )
216216
217217 buf := bytes .NewBuffer ([]byte ("test message" ))
218218 url := fmt .Sprintf ("http://%s/pub?topic=%s&defer=%d" , httpAddr , topicName , 1000 )
@@ -242,7 +242,7 @@ func TestHTTPSRequire(t *testing.T) {
242242 defer nsqd .Exit ()
243243
244244 topicName := "test_http_pub_req" + strconv .Itoa (int (time .Now ().Unix ()))
245- topic := nsqd .GetOrCreateTopic (topicName )
245+ topic , _ := nsqd .GetOrCreateTopic (topicName )
246246
247247 buf := bytes .NewBuffer ([]byte ("test message" ))
248248 url := fmt .Sprintf ("http://%s/pub?topic=%s" , httpAddr , topicName )
@@ -289,7 +289,7 @@ func TestHTTPSRequireVerify(t *testing.T) {
289289
290290 httpsAddr := nsqd .httpsListener .Addr ().(* net.TCPAddr )
291291 topicName := "test_http_pub_req_verf" + strconv .Itoa (int (time .Now ().Unix ()))
292- topic := nsqd .GetOrCreateTopic (topicName )
292+ topic , _ := nsqd .GetOrCreateTopic (topicName )
293293
294294 // no cert
295295 buf := bytes .NewBuffer ([]byte ("test message" ))
@@ -353,7 +353,7 @@ func TestTLSRequireVerifyExceptHTTP(t *testing.T) {
353353 defer nsqd .Exit ()
354354
355355 topicName := "test_http_req_verf_except_http" + strconv .Itoa (int (time .Now ().Unix ()))
356- topic := nsqd .GetOrCreateTopic (topicName )
356+ topic , _ := nsqd .GetOrCreateTopic (topicName )
357357
358358 // no cert
359359 buf := bytes .NewBuffer ([]byte ("test message" ))
@@ -761,7 +761,7 @@ func TestEmptyChannel(t *testing.T) {
761761 test .Equal (t , 404 , resp .StatusCode )
762762 test .HTTPError (t , resp , 404 , "TOPIC_NOT_FOUND" )
763763
764- topic := nsqd .GetOrCreateTopic (topicName )
764+ topic , _ := nsqd .GetOrCreateTopic (topicName )
765765
766766 url = fmt .Sprintf ("http://%s/channel/empty?topic=%s&channel=%s" , httpAddr , topicName , channelName )
767767 resp , err = http .Post (url , "application/json" , nil )
0 commit comments