mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[FIXED] Increased AckWait in TestMQTTQoS2RetriesPublish, TestMQTTQoS2RetriesPubRel (#4518)
TestMQTTQoS2RetriesPublish to 100ms, and in TestMQTTQoS2RetriesPubRel to 50ms. A lesser value caused another PUBLISH to be fired while the test was still processing the final QoS2 flow. Reduced the number of retries we wait for to make the test a little quicker.
This commit is contained in:
@@ -5055,7 +5055,7 @@ func TestMQTTQoS2RejectPublishDuplicates(t *testing.T) {
|
||||
|
||||
func TestMQTTQoS2RetriesPublish(t *testing.T) {
|
||||
o := testMQTTDefaultOptions()
|
||||
o.MQTT.AckWait = 10 * time.Millisecond
|
||||
o.MQTT.AckWait = 100 * time.Millisecond
|
||||
s := testMQTTRunServer(t, o)
|
||||
defer testMQTTShutdownServer(s)
|
||||
|
||||
@@ -5081,8 +5081,8 @@ func TestMQTTQoS2RetriesPublish(t *testing.T) {
|
||||
// yet.
|
||||
subPI := testMQTTCheckPubMsgNoAck(t, c, r, "foo", mqttPubQoS2, []byte("data1"))
|
||||
|
||||
// See that the message is redelivered again 3 times, with the DUP on, before we PUBREC it.
|
||||
for i := 0; i < 3; i++ {
|
||||
// See that the message is redelivered again 2 times, with the DUP on, before we PUBREC it.
|
||||
for i := 0; i < 2; i++ {
|
||||
expectedFlags := mqttPubQoS2 | mqttPubFlagDup
|
||||
pi := testMQTTCheckPubMsgNoAck(t, c, r, "foo", expectedFlags, []byte("data1"))
|
||||
if pi != subPI {
|
||||
@@ -5099,7 +5099,7 @@ func TestMQTTQoS2RetriesPublish(t *testing.T) {
|
||||
|
||||
func TestMQTTQoS2RetriesPubRel(t *testing.T) {
|
||||
o := testMQTTDefaultOptions()
|
||||
o.MQTT.AckWait = 10 * time.Millisecond
|
||||
o.MQTT.AckWait = 50 * time.Millisecond
|
||||
s := testMQTTRunServer(t, o)
|
||||
defer testMQTTShutdownServer(s)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user