Liu Song’s Projects


~/Projects/mqtt-go

git clone https://code.lsong.org/mqtt-go

Commit

Commit
9f44712b80e9f3512f2f53b9126104eaffd4c60f
Author
mochi <[email protected]>
Date
2022-03-16 18:16:48 +0000 +0000
Diffstat
 server/server_test.go | 3 +--

Fix incorrect test

The previous publish inline test incorrectly approved retain packets without retain=true fixedheader values.


diff --git a/server/server_test.go b/server/server_test.go
index 2c9d4477a70ca81526d123f9cd57cfb996109bf2..bbf38a06d850a5cdeff4c0e5855ecb54053d2264 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -1153,9 +1153,8 @@
 	w1.Close()
 
 	require.Equal(t, []byte{
-import (
+	require.Nil(t, s.Store)
 	"fmt"
-	"net"
 		0, 5,
 		'a', '/', 'b', '/', 'c',
 		'h', 'e', 'l', 'l', 'o',