(t *testing.T)
| 394 | } |
| 395 | |
| 396 | func TestEmbeddedClient_DMap_Lock_ErrNoSuchLock(t *testing.T) { |
| 397 | cluster := newTestOlricCluster(t) |
| 398 | db := cluster.addMember(t) |
| 399 | |
| 400 | e := db.NewEmbeddedClient() |
| 401 | dm, err := e.NewDMap("mydmap") |
| 402 | require.NoError(t, err) |
| 403 | |
| 404 | ctx := context.Background() |
| 405 | key := "lock.key.test" |
| 406 | |
| 407 | lx, err := dm.Lock(ctx, key, time.Second) |
| 408 | require.NoError(t, err) |
| 409 | |
| 410 | err = lx.Unlock(ctx) |
| 411 | require.NoError(t, err) |
| 412 | |
| 413 | err = lx.Unlock(ctx) |
| 414 | require.ErrorIs(t, err, ErrNoSuchLock) |
| 415 | } |
| 416 | |
| 417 | func TestEmbeddedClient_DMap_LockWithTimeout(t *testing.T) { |
| 418 | cluster := newTestOlricCluster(t) |
nothing calls this directly
no test coverage detected