@@ -19,7 +19,7 @@ func TestKVStoreTxs(t *testing.T) {
1919 t .Parallel ()
2020
2121 ctx := context .Background ()
22- db := NewTestDB (t )
22+ db := NewTestDB (t , clock . NewDefaultClock () )
2323 store := db .GetKVStores ("AutoFees" , [4 ]byte {1 , 1 , 1 , 1 }, "auto-fees" )
2424
2525 // Test that if an action fails midway through the transaction, then
@@ -79,14 +79,15 @@ func TestTempAndPermStores(t *testing.T) {
7979// session level KV stores.
8080func testTempAndPermStores (t * testing.T , featureSpecificStore bool ) {
8181 ctx := context .Background ()
82+ clock := clock .NewDefaultClock ()
8283
8384 var featureName string
8485 if featureSpecificStore {
8586 featureName = "auto-fees"
8687 }
8788
88- sessions := session .NewTestDB (t , clock . NewDefaultClock () )
89- store := NewTestDBWithSessions (t , sessions )
89+ sessions := session .NewTestDB (t , clock )
90+ store := NewTestDBWithSessions (t , sessions , clock )
9091 db := NewDB (store )
9192 require .NoError (t , db .Start (ctx ))
9293
@@ -172,9 +173,10 @@ func testTempAndPermStores(t *testing.T, featureSpecificStore bool) {
172173func TestKVStoreNameSpaces (t * testing.T ) {
173174 t .Parallel ()
174175 ctx := context .Background ()
176+ clock := clock .NewDefaultClock ()
175177
176- sessions := session .NewTestDB (t , clock . NewDefaultClock () )
177- db := NewTestDBWithSessions (t , sessions )
178+ sessions := session .NewTestDB (t , clock )
179+ db := NewTestDBWithSessions (t , sessions , clock )
178180
179181 // Create 2 sessions that we can reference.
180182 sess1 , err := sessions .NewSession (
@@ -397,9 +399,10 @@ func TestKVStoreNameSpaces(t *testing.T) {
397399func TestKVStoreSessionCoupling (t * testing.T ) {
398400 t .Parallel ()
399401 ctx := context .Background ()
402+ clock := clock .NewDefaultClock ()
400403
401- sessions := session .NewTestDB (t , clock . NewDefaultClock () )
402- db := NewTestDBWithSessions (t , sessions )
404+ sessions := session .NewTestDB (t , clock )
405+ db := NewTestDBWithSessions (t , sessions , clock )
403406
404407 // Get a kvstore namespaced by a session ID for a session that does
405408 // not exist.
0 commit comments