Update Coherence driver to add near cache option

This commit is contained in:
Tim Middleton
2024-03-08 15:39:04 +08:00
parent fc05d5dc68
commit 21a2ad89f2
6 changed files with 77 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
package coherence
/*
* Copyright © 2023, Oracle and/or its affiliates.
* Copyright © 2023, 2024 Oracle and/or its affiliates.
*/
import (
"github.com/stretchr/testify/require"
@@ -22,7 +22,8 @@ var testStore *Storage
func TestMain(m *testing.M) {
testStore, _ = New(Config{
Reset: true,
Reset: true,
NearCacheTimeout: time.Duration(20) * time.Second,
})
code := m.Run()
@@ -34,8 +35,9 @@ func TestMain(m *testing.M) {
// newTestStore returns a new Coherence Store and ensures it is reset.
func newTestStore(t testing.TB, config ...Config) (*Storage, error) {
t.Helper()
var err error
testStore, err := New(config...)
testStore, err = New(config...)
require.NoError(t, err)
err = testStore.Reset()