Fix some timing and bump server version

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2021-09-01 18:03:14 -06:00
parent 44c57a5702
commit ba36aa452b
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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)
})
}