@@ -224,7 +224,7 @@ func TestTenantManager_CreateProjects(t *testing.T) {
224224
225225 tx , err = tm .StartTx (ctx )
226226 require .NoError (t , err )
227- err = tenant .reload (ctx , tx , nil , nil )
227+ err = tenant .reload (ctx , tx , nil , nil , tm )
228228 require .NoError (t , err )
229229 proj1 , err := tenant .GetProject (tenantProj1 )
230230 require .NoError (t , err )
@@ -272,7 +272,7 @@ func TestTenantManager_DatabaseBranches(t *testing.T) {
272272 databases := (& Project {}).GetDatabaseWithBranches ()
273273 require .Len (t , databases , 0 )
274274
275- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
275+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
276276
277277 require .NoError (t , tenant .CreateBranch (ctx , tx , tenantProj1 , NewDatabaseNameWithBranch (tenantProj1 , "branch1" )))
278278 require .NoError (t , tenant .CreateBranch (ctx , tx , tenantProj2 , NewDatabaseNameWithBranch (tenantProj2 , "branch1" )))
@@ -282,7 +282,7 @@ func TestTenantManager_DatabaseBranches(t *testing.T) {
282282 require .ErrorContains (t , tenant .CreateBranch (ctx , tx , unknownProject , NewDatabaseNameWithBranch (unknownProject , "branch1" )), "project doesn't exist" )
283283
284284 // reload again to get all the branches
285- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
285+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
286286
287287 // list all branches
288288 branches := tenant .ListDatabaseBranches (tenantProj1 )
@@ -339,7 +339,7 @@ func TestTenantManager_DatabaseBranches(t *testing.T) {
339339 require .NoError (t , tenant .DeleteBranch (ctx , tx , tenantProj1 , NewDatabaseNameWithBranch (tenantProj1 , "branch2" )))
340340 require .ErrorContains (t , tenant .DeleteBranch (ctx , tx , unknownProject , NewDatabaseNameWithBranch (unknownProject , "branch1" )), "project doesn't exist" )
341341
342- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
342+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
343343 require .NoError (t , tx .Commit (ctx ))
344344
345345 tx , err = tm .StartTx (ctx )
@@ -402,7 +402,7 @@ func TestTenantManager_CreateCollections(t *testing.T) {
402402 err = tenant .CreateProject (ctx , tx , tenantProj2 , nil )
403403 require .NoError (t , err )
404404
405- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
405+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
406406
407407 proj1 , err := tenant .GetProject (tenantProj1 )
408408 require .NoError (t , err )
@@ -444,7 +444,7 @@ func TestTenantManager_CreateCollections(t *testing.T) {
444444 require .NoError (t , err )
445445 require .NoError (t , tenant .CreateCollection (ctx , tx , db2 , factory ))
446446
447- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
447+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
448448
449449 proj2 , err = tenant .GetProject (tenantProj2 )
450450 require .NoError (t , err )
@@ -477,7 +477,7 @@ func TestTenantManager_DropCollection(t *testing.T) {
477477 err = tenant .CreateProject (ctx , tx , tenantProj2 , nil )
478478 require .NoError (t , err )
479479
480- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
480+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
481481
482482 proj1 , err := tenant .GetProject (tenantProj1 )
483483 require .NoError (t , err )
@@ -507,7 +507,7 @@ func TestTenantManager_DropCollection(t *testing.T) {
507507 factory , err := schema .NewFactoryBuilder (true ).Build ("test_collection" , jsSchema )
508508 require .NoError (t , err )
509509 require .NoError (t , tenant .CreateCollection (ctx , tx , db2 , factory ))
510- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
510+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
511511 require .NoError (t , tx .Commit (ctx ))
512512
513513 tx , err = tm .StartTx (ctx )
@@ -549,7 +549,7 @@ func TestTenantManager_SearchIndexes(t *testing.T) {
549549 err = tenant .CreateProject (ctx , tx , tenantProj1 , nil )
550550 require .NoError (t , err )
551551
552- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
552+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
553553
554554 proj1 , err := tenant .GetProject (tenantProj1 )
555555 require .NoError (t , err )
@@ -578,7 +578,7 @@ func TestTenantManager_SearchIndexes(t *testing.T) {
578578 require .NoError (t , err )
579579 require .NotNil (t , indexesInSearchStore [tenant .Encoder .EncodeSearchTableName (tenant .namespace .Id (), proj1 .Id (), factory .Name )])
580580
581- require .NoError (t , tenant .reload (ctx , tx , nil , indexesInSearchStore ))
581+ require .NoError (t , tenant .reload (ctx , tx , nil , indexesInSearchStore , tm ))
582582
583583 proj1 , err = tenant .GetProject (tenantProj1 )
584584 require .NoError (t , err )
@@ -615,7 +615,7 @@ func TestTenantManager_SecondaryIndexes(t *testing.T) {
615615 err = tenant .CreateProject (ctx , tx , tenantProj2 , nil )
616616 require .NoError (t , err )
617617
618- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
618+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
619619
620620 proj1 , err := tenant .GetProject (tenantProj1 )
621621 require .NoError (t , err )
@@ -657,7 +657,7 @@ func TestTenantManager_SecondaryIndexes(t *testing.T) {
657657 require .NoError (t , err )
658658 require .NoError (t , tenant .CreateCollection (ctx , tx , db2 , factory ))
659659
660- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
660+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
661661
662662 proj2 , err = tenant .GetProject (tenantProj2 )
663663 require .NoError (t , err )
@@ -688,7 +688,7 @@ func TestTenantManager_SecondaryIndexes(t *testing.T) {
688688 err = tenant .CreateProject (ctx , tx , tenantProj1 , nil )
689689 require .NoError (t , err )
690690
691- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
691+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
692692
693693 proj1 , err := tenant .GetProject (tenantProj1 )
694694 require .NoError (t , err )
@@ -720,7 +720,7 @@ func TestTenantManager_SecondaryIndexes(t *testing.T) {
720720 require .NoError (t , err )
721721 require .NoError (t , tenant .CreateCollection (ctx , tx , db1 , factory ))
722722
723- require .NoError (t , tenant .reload (ctx , tx , nil , nil ))
723+ require .NoError (t , tenant .reload (ctx , tx , nil , nil , tm ))
724724
725725 proj1 , err = tenant .GetProject (tenantProj1 )
726726 require .NoError (t , err )
@@ -1098,7 +1098,7 @@ func TestTenantManager_SearchDataSize(t *testing.T) {
10981098
10991099 err = tenant .CreateProject (ctx , tmTx , tenantProj2 , nil )
11001100 require .NoError (t , err )
1101- require .NoError (t , tenant .reload (ctx , tmTx , nil , nil ))
1101+ require .NoError (t , tenant .reload (ctx , tmTx , nil , nil , tm ))
11021102
11031103 // proj1
11041104 proj1 , err := tenant .GetProject (tenantProj1 )
0 commit comments