client-java
client-java copied to clipboard
put success with TTL=-1, but TTL value is null in tikv, should restrict ttl value >=0
-
step @Test public void putwithInvalidTTL() { if (!initialized) return; long ttl = -1; ByteString key = ByteString.copyFromUtf8("key_lt"); ByteString value = ByteString.copyFromUtf8("value1"); checkDelete(key); try { client.put(key, value, ttl); } catch (Exception e) { logger.info("put fail for error:" + e); } Long t = client.getKeyTTL(key); logger.info("current ttl of key is " + t); checkDelete(key); logger.info("done"); }
-
expect result: put fail with invalid ttl value
-
current result: put successfully, and get back value is null.