[PCBC-154] test for touch with expiration needs updating (maybe) Created: 03/Dec/12 Updated: 16/Apr/13 Resolved: 16/Apr/13 |
|
| Status: | Resolved |
| Project: | Couchbase PHP client library |
| Component/s: | library |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | Public |
| Type: | Bug | Priority: | Major |
| Reporter: | Mark Nunberg | Assignee: | Trond Norbye |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I'm really not sure what the behavior should be, but it's worth clarifying.
What does touch with an argument of 0 imply -- it is effectively a delete. Perhaps this should be a warning etc? Please post your comments. |
| Comments |
| Comment by Matt Ingenthron [ 03/Dec/12 ] |
|
Given that using an expiration of 0 means "forever", I would think a touch of 0 would extend the time to forever.
In fact, the documentation says that: http://www.couchbase.com/docs/couchbase-devguide-2.0/cb-touch.html Trond: can you verify we do the right thing here? |
| Comment by Matt Ingenthron [ 03/Dec/12 ] |
|
See also a commit in limbo:
http://review.couchbase.org/#/c/21848/ |
| Comment by Trond Norbye [ 04/Dec/12 ] |
|
This is not a bug in the PHP extension, but a bug in the server. I filed |
| Comment by Matt Ingenthron [ 04/Dec/12 ] |
| Thanks for getting that addressed Trond. |
| Comment by Matt Ingenthron [ 19/Dec/12 ] |
|
The underlying question on this test has been resolved. There was a server bug and a touch with expiration of 0 should not return an error, but should rather extend it from whatever the current time is to forever. A good functional test would be: - Set with expiration of 3 secs - Touch with expiration of 0 - Check 3 secs later to see if it's still there. |
| Comment by Matt Ingenthron [ 15/Apr/13 ] |
| Trond: can you review what, if anything more, needs to be done here? I think it's closeable. |
| Comment by Trond Norbye [ 16/Apr/13 ] |
| I verified that this worked as intended in a test program. I don't want to add more tests than necessary to the test suite that does sleep, and this test is not testing the client but verifies the server and should therefore be done elsewhere... |