@@ -32,6 +32,8 @@ public partial class PersistenceTestsConfiguration : IProvideCosmosClient
3232
3333 public CosmosClient Client { get ; } = SetupFixture . CosmosDbClient ;
3434
35+ public int OutboxTimeToLiveInSeconds { get ; set ; } = 100 ;
36+
3537 public Task Configure ( )
3638 {
3739 // with this we have a partition key per run which makes things naturally isolated
@@ -46,14 +48,17 @@ public Task Configure()
4648 var resolver = new ContainerHolderResolver ( this , new ContainerInformation ( SetupFixture . ContainerName , partitionKeyPath ) , SetupFixture . DatabaseName ) ;
4749 SynchronizedStorage = new StorageSessionFactory ( resolver , null ) ;
4850 SagaStorage = new SagaPersister ( serializer , false ) ;
49- OutboxStorage = new OutboxPersister ( resolver , serializer , 100 ) ;
51+ OutboxStorage = new OutboxPersister ( resolver , serializer , OutboxTimeToLiveInSeconds ) ;
5052
5153 GetContextBagForSagaStorage = ( ) =>
5254 {
5355 var contextBag = new ContextBag ( ) ;
5456 // This populates the partition key required to participate in a shared transaction
55- var setAsDispatchedHolder = new SetAsDispatchedHolder { PartitionKey = new PartitionKey ( partitionKey ) } ;
56- setAsDispatchedHolder . ContainerHolder = resolver . ResolveAndSetIfAvailable ( contextBag ) ;
57+ var setAsDispatchedHolder = new SetAsDispatchedHolder
58+ {
59+ PartitionKey = new PartitionKey ( partitionKey ) ,
60+ ContainerHolder = resolver . ResolveAndSetIfAvailable ( contextBag )
61+ } ;
5762 contextBag . Set ( setAsDispatchedHolder ) ;
5863 contextBag . Set ( new PartitionKey ( partitionKey ) ) ;
5964 return contextBag ;
@@ -63,8 +68,11 @@ public Task Configure()
6368 {
6469 var contextBag = new ContextBag ( ) ;
6570 // This populates the partition key required to participate in a shared transaction
66- var setAsDispatchedHolder = new SetAsDispatchedHolder { PartitionKey = new PartitionKey ( partitionKey ) } ;
67- setAsDispatchedHolder . ContainerHolder = resolver . ResolveAndSetIfAvailable ( contextBag ) ;
71+ var setAsDispatchedHolder = new SetAsDispatchedHolder
72+ {
73+ PartitionKey = new PartitionKey ( partitionKey ) ,
74+ ContainerHolder = resolver . ResolveAndSetIfAvailable ( contextBag )
75+ } ;
6876 contextBag . Set ( setAsDispatchedHolder ) ;
6977 contextBag . Set ( new PartitionKey ( partitionKey ) ) ;
7078 return contextBag ;
0 commit comments