Publication expiry test
larshesel opened this issue · 4 comments
Hi,
In the test_publication_expiry
test case I was wondering how the session of bclient
survives so it is able to receive the (not yet expired) messages after reconnecting with clean_start=False
. The first connection is done using clean_start=True
, but there's no session expiration passed when connecting, and if I understood the MQTTv5 spec correctly then the session should only survive the connection if the session expiration is set to a value greater than zero.
I probably either misunderstood the spec or the code, but I wasn't able to figure it out yet...
When I wrote the test, the default session expiry in the spec when not specified was infinite, not zero. In fact, I was instrumental in getting the default changed to avoid state being left around on servers accidentally. I'd forgotten that that change would necessitate this test to be updated.
Hi, thank you for the explanation I wasn't aware that the spec had changed on that point during the process - and thank you for making the default session expiry zero - that's going to save the world a lot of bother.
And thank you for writing this implementation - it's quite helpful when understanding the spec.
Shall I close this or do you want to keep this issue open for later?
You can leave it open - I'll refer to this issue when fixing the test and the broker, thanks.
To help understanding of the spec was one purpose of writing this implementation, so it seems like I'm achieving that goal :-)
Fixed in test and broker. Thanks.