(t *testing.T)
| 260 | } |
| 261 | |
| 262 | func TestMemcachedClient_Touch(t *testing.T) { |
| 263 | client, backend, err := setupDefaultMemcachedClient() |
| 264 | require.NoError(t, err) |
| 265 | |
| 266 | key := "foo" |
| 267 | value := []byte("bar") |
| 268 | expiration := 10 * time.Second |
| 269 | |
| 270 | client.SetAsync(key, value, expiration) |
| 271 | require.NoError(t, client.wait()) |
| 272 | |
| 273 | newExpiration := 20 * time.Second |
| 274 | err = client.Touch(context.Background(), key, newExpiration) |
| 275 | require.NoError(t, err) |
| 276 | require.Equal(t, int32(newExpiration.Seconds()), backend.values[key].Expiration) |
| 277 | } |
| 278 | |
| 279 | func TestMemcachedClient_CompareAndSwap(t *testing.T) { |
| 280 | client, backend, err := setupDefaultMemcachedClient() |
nothing calls this directly
no test coverage detected