diff options
author | Valery Piashchynski <[email protected]> | 2021-01-15 19:32:18 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-15 19:32:18 +0300 |
commit | 4c970f1876dfb5918ec2dc1d358a52698c6de040 (patch) | |
tree | 37222d13701c84b00ccc1e5d57844d2756369b5a /plugins/kv/memcached/plugin_unit_test.go | |
parent | f648d96c8516652f3231eb87be1f0a000e12793f (diff) | |
parent | 609fe5057f9f3cc2f7f5104f305f08a0496e8fef (diff) |
Merge pull request #477 from spiral/feature/worker_watcher_testsv2.0.0-beta8
feat(worker_watcher): Add stack tests
Diffstat (limited to 'plugins/kv/memcached/plugin_unit_test.go')
-rw-r--r-- | plugins/kv/memcached/plugin_unit_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/kv/memcached/plugin_unit_test.go b/plugins/kv/memcached/plugin_unit_test.go index 3d37748b..31423627 100644 --- a/plugins/kv/memcached/plugin_unit_test.go +++ b/plugins/kv/memcached/plugin_unit_test.go @@ -245,7 +245,7 @@ func TestStorage_MExpire_TTL(t *testing.T) { } assert.NoError(t, s.MExpire(i1, i2)) - time.Sleep(time.Second * 6) + time.Sleep(time.Second * 7) // ensure that storage is clean v, err = s.Has("key", "key2") @@ -341,7 +341,7 @@ func TestStorage_SetExpire_TTL(t *testing.T) { TTL: nowPlusFive, })) - time.Sleep(time.Second * 6) + time.Sleep(time.Second * 7) // ensure that storage is clean v, err = s.Has("key", "key2") @@ -387,7 +387,7 @@ func TestConcurrentReadWriteTransactions(t *testing.T) { // concurrently set the keys go func(s kv.Storage) { defer wg.Done() - for i := 0; i <= 1000; i++ { + for i := 0; i <= 100; i++ { m.Lock() // set is writable transaction // it should stop readable @@ -407,7 +407,7 @@ func TestConcurrentReadWriteTransactions(t *testing.T) { // should be no errors go func(s kv.Storage) { defer wg.Done() - for i := 0; i <= 1000; i++ { + for i := 0; i <= 100; i++ { m.RLock() v, err = s.Has("key") assert.NoError(t, err) @@ -420,7 +420,7 @@ func TestConcurrentReadWriteTransactions(t *testing.T) { // should be no errors go func(s kv.Storage) { defer wg.Done() - for i := 0; i <= 1000; i++ { + for i := 0; i <= 100; i++ { m.Lock() err = s.Delete("key" + strconv.Itoa(i)) assert.NoError(t, err) |