DESCRIPTION

JCBC-332 : Tests added for observe and arithmetic operations

Change-Id: Ie6bfac06cf168fddbbd7808a2579ece1e080c700


COMMENTS

author: Yasmin Rush
date: 2013-07-22 16:18:03.051000000

Uploaded patch set 2.

-------------------------------------
author: Natasha Sullivan
date: 2013-07-23 05:05:40.711000000

Patch Set 2:

(2 comments)

Line:653, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> whats the purpose of setting it to 0 initially and then touching it with 0 again?

If you want to test expiration, you need to set it to a value greater than 0

Line:674, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> whats the purpose of a negative expiration value? this shouldnt even work I'm sure?

because a negative time doesnt make any sense. 0 is "forever" and everything greater 0 is treated as "expire some time". either relative or if greater than 30 days (calc in seconds) is an absolute unix timestamp.

-------------------------------------
author: Yasmin Rush
date: 2013-07-23 09:02:52.251000000

Patch Set 2:

(2 comments)

Line:653, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> If I set the timeout to zero, it works to keep the key/value forever. I may remove the getAndTouch from here because its again doing the same thing. but the first operation is intentional. Do we have a way to tell the client to expire the key as soon as it is set which would then justify the timeout = zero ?

Line:674, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> I do understand where you are coming from. But, I have tried it and it works to set the expiry to forever and works the same as 0.

-------------------------------------
author: Natasha Sullivan
date: 2013-07-23 09:23:31.436000000

Patch Set 2:

(3 comments)

Line:653, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> well, you can set it to 1 and then wait 1.5 seconds or so, it will be gone by then.

Line:656, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> why do you have so many sleeps in there?

Line:674, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> I guess this should not be allowed, but since it works for now lets leave it this way. Its just that it doesnt make any sense, but we cant change it now since some people may rely on this wrong behavior.

-------------------------------------
