diff options
author | Valery Piashchynski <[email protected]> | 2021-01-15 17:57:01 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-15 17:57:01 +0300 |
commit | d5b0a6021e4855bec595b613a0937a52cda54397 (patch) | |
tree | 4914772328ca1a7ea8ad7b892ceffc0bf4d5604c /plugins/kv/memory | |
parent | 07f51245a676942763ba0b7b90d46b628ca53ee7 (diff) |
Reduce number of concurrent iterations on KV public API to 100
Diffstat (limited to 'plugins/kv/memory')
-rw-r--r-- | plugins/kv/memory/plugin_unit_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/kv/memory/plugin_unit_test.go b/plugins/kv/memory/plugin_unit_test.go index d3b24860..c7dd882f 100644 --- a/plugins/kv/memory/plugin_unit_test.go +++ b/plugins/kv/memory/plugin_unit_test.go @@ -428,7 +428,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 @@ -448,7 +448,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) @@ -461,7 +461,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) |