mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 11:48:43 -07:00
Fix some timing and bump server version
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -41,7 +41,7 @@ var (
|
||||
|
||||
const (
|
||||
// VERSION is the current version for the server.
|
||||
VERSION = "2.4.0"
|
||||
VERSION = "2.4.1-beta.1"
|
||||
|
||||
// PROTO is the currently supported protocol.
|
||||
// 0 was the original
|
||||
|
||||
@@ -1843,24 +1843,24 @@ func TestJetStreamWorkQueueRequest(t *testing.T) {
|
||||
// Now do expiration
|
||||
req.Batch = 1
|
||||
req.NoWait = false
|
||||
req.Expires = 10 * time.Millisecond
|
||||
req.Expires = 100 * time.Millisecond
|
||||
jreq, _ = json.Marshal(req)
|
||||
|
||||
nc.PublishRequest(getSubj, reply, jreq)
|
||||
// Let it expire
|
||||
time.Sleep(20 * time.Millisecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
// Send a few more messages. These should not be delivered to the sub.
|
||||
sendStreamMsg(t, nc, "foo", "Hello World!")
|
||||
sendStreamMsg(t, nc, "bar", "Hello World!")
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
checkSubPending(0)
|
||||
|
||||
// Send a new request, we should not get the 408 because our previous request
|
||||
// should have expired.
|
||||
nc.PublishRequest(getSubj, reply, jreq)
|
||||
checkSubPending(1)
|
||||
sub.NextMsg(time.Millisecond)
|
||||
sub.NextMsg(time.Second)
|
||||
checkSubPending(0)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user