Skip to content

Commit

Permalink
RavenDB-21724 : fix flaky test - wait for database deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
aviv86 committed Nov 21, 2023
1 parent 013e95b commit 226599d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/SlowTests/Sharding/ShardingTopologyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ public async Task AddAndDeleteShardFromDatabase_ShardHasNoBucketsMapping()
await Cluster.WaitForRaftIndexToBeAppliedInClusterAsync(deleteShardDatabaseRes.RaftCommandIndex);
}

var record = await store.Maintenance.Server.SendAsync(new GetDatabaseRecordOperation(store.Database));
DatabaseRecord record = null;
await WaitAndAssertForValueAsync(async () =>
{
record = await store.Maintenance.Server.SendAsync(new GetDatabaseRecordOperation(store.Database));
return record.DeletionInProgress.Count;
}, expectedVal: 0);

Assert.Equal(2, record.Sharding.Shards.Count);

//make sure the nodes that held the deleted shard no longer have any of this shard's db instances
Expand Down

0 comments on commit 226599d

Please sign in to comment.