Skip to content

Commit 23a8d58

Browse files
authored
Merge pull request wistia#10 from netantho/nsqenv
Support for NSQ 1.0.0
2 parents 5449541 + 0b22dc2 commit 23a8d58

File tree

4 files changed

+68
-52
lines changed

4 files changed

+68
-52
lines changed

.travis.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,25 @@ otp_release:
88
- 18.0
99
- 19.3
1010

11+
env:
12+
- NSQ_DOWNLOAD=nsq-0.3.5.linux-amd64.go1.4.2 NSQ_VER=v0.3.5 WORKER_ID=worker-id
13+
- NSQ_DOWNLOAD=nsq-0.3.6.linux-amd64.go1.5.1 NSQ_VER=v0.3.6 WORKER_ID=worker-id
14+
- NSQ_DOWNLOAD=nsq-0.3.7.linux-amd64.go1.6 NSQ_VER=v0.3.7 WORKER_ID=worker-id
15+
- NSQ_DOWNLOAD=nsq-0.3.8.linux-amd64.go1.6.2 NSQ_VER=v0.3.8 WORKER_ID=worker-id
16+
- NSQ_DOWNLOAD=nsq-1.0.0-compat.linux-amd64.go1.8 NSQ_VER=v1.0.0-compat WORKER_ID=node-id
17+
1118
before_install:
12-
- wget https://github.com/fclairamb/nsq-debian-package/releases/download/0.3.5/nsq_0.3.5_amd64.deb
13-
- sudo dpkg -i nsq_0.3.5_amd64.deb
19+
- wget https://github.com/nsqio/nsq/releases/download/$NSQ_VER/$NSQ_DOWNLOAD.tar.gz
20+
- tar xvzf $NSQ_DOWNLOAD.tar.gz
1421

1522
before_script:
1623
- MIX_ENV=test mix deps.get
1724
- MIX_ENV=test mix compile
1825
- MIX_ENV=test mix run --no-halt -e "NSQ.Test.AuthServer.start(6790)" &
19-
- nsqd --tcp-address=127.0.0.1:6750 --http-address=127.0.0.1:6751 --worker-id=512 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 &
20-
- nsqd --tcp-address=127.0.0.1:6760 --http-address=127.0.0.1:6761 --worker-id=513 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 &
21-
- nsqd --tcp-address=127.0.0.1:6765 --http-address=127.0.0.1:6766 --https-address=127.0.0.1:6767 --worker-id=514 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt --auth-http-address=127.0.0.1:6790 &
22-
- nsqlookupd --tcp-address=127.0.0.1:6770 --http-address=127.0.0.1:6771 --broadcast-address=127.0.0.1 &
23-
- nsqlookupd --tcp-address=127.0.0.1:6780 --http-address=127.0.0.1:6781 --broadcast-address=127.0.0.1 &
26+
- $NSQ_DOWNLOAD/bin/nsqd --tcp-address=127.0.0.1:6750 --http-address=127.0.0.1:6751 --$WORKER_ID=512 --data-path=test/data_paths/512 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 &
27+
- $NSQ_DOWNLOAD/bin/nsqd --tcp-address=127.0.0.1:6760 --http-address=127.0.0.1:6761 --$WORKER_ID=513 --data-path=test/data_paths/513 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 &
28+
- $NSQ_DOWNLOAD/bin/nsqd --tcp-address=127.0.0.1:6765 --http-address=127.0.0.1:6766 --https-address=127.0.0.1:6767 --$WORKER_ID=514 --data-path=test/data_paths/514 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt --auth-http-address=127.0.0.1:6790 &
29+
- $NSQ_DOWNLOAD/bin/nsqlookupd --tcp-address=127.0.0.1:6770 --http-address=127.0.0.1:6771 --broadcast-address=127.0.0.1 &
30+
- $NSQ_DOWNLOAD/bin/nsqlookupd --tcp-address=127.0.0.1:6780 --http-address=127.0.0.1:6781 --broadcast-address=127.0.0.1 &
2431

2532
script: mix test

Procfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
nsq_auth: MIX_ENV=test mix run --no-halt -e "NSQ.Test.AuthServer.start(6790)"
2-
nsqd1: nsqd --tcp-address=127.0.0.1:6750 --http-address=127.0.0.1:6751 --https-address=127.0.0.1:6752 --worker-id=512 --data-path=test/data_paths/512 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt --verbose=true
3-
nsqd2: nsqd --tcp-address=127.0.0.1:6760 --http-address=127.0.0.1:6761 --https-address=127.0.0.1:6762 --worker-id=513 --data-path=test/data_paths/513 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt
4-
nsqd3: nsqd --tcp-address=127.0.0.1:6765 --http-address=127.0.0.1:6766 --https-address=127.0.0.1:6767 --worker-id=514 --data-path=test/data_paths/514 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt --auth-http-address=127.0.0.1:6790 --verbose=true
2+
nsqd1: nsqd --tcp-address=127.0.0.1:6750 --http-address=127.0.0.1:6751 --https-address=127.0.0.1:6752 --$WORKER_ID=512 --data-path=test/data_paths/512 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt --verbose=true
3+
nsqd2: nsqd --tcp-address=127.0.0.1:6760 --http-address=127.0.0.1:6761 --https-address=127.0.0.1:6762 --$WORKER_ID=513 --data-path=test/data_paths/513 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt
4+
nsqd3: nsqd --tcp-address=127.0.0.1:6765 --http-address=127.0.0.1:6766 --https-address=127.0.0.1:6767 --$WORKER_ID=514 --data-path=test/data_paths/514 --broadcast-address=127.0.0.1 --lookupd-tcp-address=127.0.0.1:6770 --lookupd-tcp-address=127.0.0.1:6780 --tls-required=false --tls-root-ca-file=test/ssl_keys/elixirNsq.pem --tls-key=test/ssl_keys/elixir_nsq.key --tls-cert=test/ssl_keys/elixir_nsq.crt --auth-http-address=127.0.0.1:6790 --verbose=true
55
nsqlookupd1: nsqlookupd --tcp-address=127.0.0.1:6770 --http-address=127.0.0.1:6771 --broadcast-address=127.0.0.1
66
nsqlookupd2: nsqlookupd --tcp-address=127.0.0.1:6780 --http-address=127.0.0.1:6781 --broadcast-address=127.0.0.1

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,17 @@ with foreman is included to start these up. If you don't have
190190
[foreman](https://github.com/ddollar/foreman), you'll need to find a way to run
191191
those commands if you want to run the tests.
192192

193+
If you are using nsq < 1.0.0
194+
195+
```bash
196+
WORKER_ID=node-id foreman start
197+
mix test
198+
```
199+
200+
If you are using nsq >= 1.0.0
201+
193202
```bash
194-
foreman start
203+
WORKER_ID=worker-id foreman start
195204
mix test
196205
```
197206

test/consumer_test.exs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ defmodule NSQ.ConsumerTest do
4949
NSQ.Consumer.event_manager(consumer)
5050
|> GenEvent.add_handler(NSQ.ConsumerTest.EventForwarder, self())
5151

52-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "hello"])
52+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "hello"])
5353
assert_receive {:message_finished, _}, 2000
5454

55-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "too_slow"])
55+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "too_slow"])
5656
assert_receive {:message_requeued, _}, 2000
5757
end
5858

@@ -75,7 +75,7 @@ defmodule NSQ.ConsumerTest do
7575
NSQ.Consumer.event_manager(consumer)
7676
|> GenEvent.add_handler(NSQ.ConsumerTest.EventForwarder, self())
7777

78-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "hello"])
78+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "hello"])
7979

8080
# Without touch, this message would fail after 1 second. So we test that
8181
# it takes longer than 1 second but succeeds.
@@ -96,12 +96,12 @@ defmodule NSQ.ConsumerTest do
9696
end
9797
})
9898

99-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "hello"])
100-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "hello"])
101-
HTTP.post("http://127.0.0.1:6761/put?topic=#{@test_topic}", [body: "hello"])
102-
HTTP.post("http://127.0.0.1:6761/put?topic=#{@test_topic}", [body: "hello"])
103-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "hello"])
104-
HTTP.post("http://127.0.0.1:6761/put?topic=#{@test_topic}", [body: "hello"])
99+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "hello"])
100+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "hello"])
101+
HTTP.post("http://127.0.0.1:6761/pub?topic=#{@test_topic}", [body: "hello"])
102+
HTTP.post("http://127.0.0.1:6761/pub?topic=#{@test_topic}", [body: "hello"])
103+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "hello"])
104+
HTTP.post("http://127.0.0.1:6761/pub?topic=#{@test_topic}", [body: "hello"])
105105

106106
:timer.sleep(100)
107107
[info1, info2] = NSQ.Consumer.conn_info(consumer) |> Map.values
@@ -135,14 +135,14 @@ defmodule NSQ.ConsumerTest do
135135
end
136136
})
137137

138-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "fast"])
138+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "fast"])
139139
assert_receive(:handled, 2000)
140140

141-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "slow"])
142-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "medium"])
141+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "slow"])
142+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "medium"])
143143
NSQ.Consumer.close(consumer)
144144
:timer.sleep(50)
145-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "fast"])
145+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "fast"])
146146
refute_receive(:handled, 2000)
147147
end
148148

@@ -159,7 +159,7 @@ defmodule NSQ.ConsumerTest do
159159
NSQ.Consumer.event_manager(consumer)
160160
|> GenEvent.add_handler(NSQ.ConsumerTest.EventForwarder, self())
161161

162-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
162+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
163163
assert_receive(:handled, 2000)
164164

165165
assert_receive({:message, %NSQ.Message{}}, 2000)
@@ -189,11 +189,11 @@ defmodule NSQ.ConsumerTest do
189189
previous_timestamp = info.last_msg_timestamp
190190
:timer.sleep(1000)
191191

192-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "ok"])
193-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "req"])
194-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "req2000"])
195-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "fail"])
196-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "backoff"])
192+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "ok"])
193+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "req"])
194+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "req2000"])
195+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "fail"])
196+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "backoff"])
197197

198198
assert_receive({:message, _}, 2000)
199199
assert_receive({:message, _}, 2000)
@@ -230,7 +230,7 @@ defmodule NSQ.ConsumerTest do
230230
})
231231

232232
# Send a message so we can be sure the connection is up and working first.
233-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
233+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
234234
assert_receive(:handled, 2000)
235235

236236
# Abruptly close the connection
@@ -255,7 +255,7 @@ defmodule NSQ.ConsumerTest do
255255
assert conn1 != conn2
256256

257257
# Send another message so we can verify the new connection is working.
258-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
258+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
259259
assert_receive(:handled, 2000)
260260
end
261261

@@ -271,10 +271,10 @@ defmodule NSQ.ConsumerTest do
271271
end
272272
})
273273

274-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
274+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
275275
assert_receive(:handled, 2000)
276276

277-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
277+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
278278
assert_receive(:handled, 2000)
279279
end
280280

@@ -291,8 +291,8 @@ defmodule NSQ.ConsumerTest do
291291
end
292292
})
293293

294-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
295-
HTTP.post("http://127.0.0.1:6761/put?topic=#{@test_topic}", [body: "HTTP message"])
294+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
295+
HTTP.post("http://127.0.0.1:6761/pub?topic=#{@test_topic}", [body: "HTTP message"])
296296

297297
assert_receive(:handled, 2000)
298298
assert_receive(:handled, 2000)
@@ -374,7 +374,7 @@ defmodule NSQ.ConsumerTest do
374374
})
375375

376376
Enum.map 1..1000, fn(_i) ->
377-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
377+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
378378
end
379379

380380
assert_receive_n_times(:handled, 1000, 2000)
@@ -424,11 +424,11 @@ defmodule NSQ.ConsumerTest do
424424

425425
# Send one successful message through so our subsequent timing is more
426426
# predictable.
427-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
427+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
428428
assert_receive({:message_finished, _}, 5000)
429429

430430
# Our message handler enters into backoff mode and requeues the message.
431-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
431+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
432432
assert_receive({:message_requeued, _}, 2000)
433433
assert_receive(:backoff, 1000)
434434

@@ -474,7 +474,7 @@ defmodule NSQ.ConsumerTest do
474474
assert_receive({:message_finished, _}, 2000)
475475

476476
# Send a successful message and leave backoff mode! (I hope!)
477-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
477+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
478478
assert_receive({:message_finished, _}, 2000)
479479
assert_receive(:resume, 100)
480480
cons_state = Cons.get_state(consumer)
@@ -501,7 +501,7 @@ defmodule NSQ.ConsumerTest do
501501
cons = Cons.get(cons_sup_pid)
502502
[conn] = Connections.get(cons)
503503

504-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
504+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
505505
refute_receive :handled, 500
506506
cons_state = Cons.get_state(cons)
507507
assert ConnInfo.fetch(cons_state, conn, :retry_rdy_pid) == nil
@@ -571,10 +571,10 @@ defmodule NSQ.ConsumerTest do
571571
end
572572
})
573573

574-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
574+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
575575
assert_receive(:handled, 2000)
576576

577-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
577+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
578578
assert_receive(:handled, 2000)
579579
end
580580

@@ -596,7 +596,7 @@ defmodule NSQ.ConsumerTest do
596596
end
597597
})
598598

599-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
599+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
600600
refute_receive(:handled, 2000)
601601
end
602602
end
@@ -618,12 +618,12 @@ defmodule NSQ.ConsumerTest do
618618
assert NSQ.Consumer.starved?(consumer) == false
619619

620620
# One message in flight, 50% of last_rdy, not starved
621-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
621+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
622622
assert_receive({:message, _}, 2000)
623623
assert NSQ.Consumer.starved?(consumer) == false
624624

625625
# Two messages in flight, 100% of last_rdy, __starved__
626-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
626+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
627627
assert_receive({:message, _}, 2000)
628628
assert NSQ.Consumer.starved?(consumer) == true
629629

@@ -647,10 +647,10 @@ defmodule NSQ.ConsumerTest do
647647
end
648648
})
649649

650-
HTTP.post("http://127.0.0.1:6766/put?topic=#{@test_topic}", [body: "HTTP message"])
650+
HTTP.post("http://127.0.0.1:6766/pub?topic=#{@test_topic}", [body: "HTTP message"])
651651
assert_receive(:handled, 2000)
652652

653-
HTTP.post("http://127.0.0.1:6766/put?topic=#{@test_topic}", [body: "HTTP message"])
653+
HTTP.post("http://127.0.0.1:6766/pub?topic=#{@test_topic}", [body: "HTTP message"])
654654
assert_receive(:handled, 2000)
655655
end
656656

@@ -667,10 +667,10 @@ defmodule NSQ.ConsumerTest do
667667
end
668668
})
669669

670-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
670+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
671671
assert_receive(:handled, 2000)
672672

673-
HTTP.post("http://127.0.0.1:6751/put?topic=#{@test_topic}", [body: "HTTP message"])
673+
HTTP.post("http://127.0.0.1:6751/pub?topic=#{@test_topic}", [body: "HTTP message"])
674674
assert_receive(:handled, 2000)
675675
end
676676

@@ -693,10 +693,10 @@ defmodule NSQ.ConsumerTest do
693693
end
694694
})
695695

696-
HTTP.post("http://127.0.0.1:6766/put?topic=#{@test_topic}", [body: "HTTP message"])
696+
HTTP.post("http://127.0.0.1:6766/pub?topic=#{@test_topic}", [body: "HTTP message"])
697697
assert_receive(:handled, 2000)
698698

699-
HTTP.post("http://127.0.0.1:6766/put?topic=#{@test_topic}", [body: "HTTP message"])
699+
HTTP.post("http://127.0.0.1:6766/pub?topic=#{@test_topic}", [body: "HTTP message"])
700700
assert_receive(:handled, 2000)
701701
end
702702

0 commit comments

Comments
 (0)