(t *testing.T)
| 358 | } |
| 359 | |
| 360 | func TestEmbeddedClient_DMap_Lock(t *testing.T) { |
| 361 | cluster := newTestOlricCluster(t) |
| 362 | db := cluster.addMember(t) |
| 363 | |
| 364 | e := db.NewEmbeddedClient() |
| 365 | dm, err := e.NewDMap("mydmap") |
| 366 | require.NoError(t, err) |
| 367 | |
| 368 | ctx := context.Background() |
| 369 | key := "lock.key.test" |
| 370 | |
| 371 | lx, err := dm.Lock(ctx, key, time.Second) |
| 372 | require.NoError(t, err) |
| 373 | |
| 374 | err = lx.Unlock(ctx) |
| 375 | require.NoError(t, err) |
| 376 | } |
| 377 | |
| 378 | func TestEmbeddedClient_DMap_Lock_ErrLockNotAcquired(t *testing.T) { |
| 379 | cluster := newTestOlricCluster(t) |
nothing calls this directly
no test coverage detected