@@ -61,7 +61,7 @@ public void can_start_streams_by_aggregate()
61
61
var aggId = Guid . NewGuid ( ) ;
62
62
var s1 = Namer . GenerateForAggregate ( typeof ( TestAggregate ) , aggId ) ;
63
63
AppendEvents ( 1 , _conn , s1 , 7 ) ;
64
- Start < TestAggregate > ( aggId ) ;
64
+ Start < TestAggregate > ( aggId , cancelWaitToken : TestContext . Current . CancellationToken ) ;
65
65
AssertEx . AtLeastModelVersion ( this , 2 , msg : $ "Expected 2 got { Version } ") ; // 1 message + CatchupSubscriptionBecameLive
66
66
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 7 ) ;
67
67
}
@@ -73,15 +73,15 @@ public void can_start_streams_by_aggregate_category()
73
73
AppendEvents ( 1 , _conn , s1 , 7 ) ;
74
74
var s2 = Namer . GenerateForAggregate ( typeof ( ReadModelTestCategoryAggregate ) , Guid . NewGuid ( ) ) ;
75
75
AppendEvents ( 1 , _conn , s2 , 5 ) ;
76
- Start < ReadModelTestCategoryAggregate > ( null , true ) ;
76
+ Start < ReadModelTestCategoryAggregate > ( null , true , cancelWaitToken : TestContext . Current . CancellationToken ) ;
77
77
78
78
AssertEx . AtLeastModelVersion ( this , 3 , msg : $ "Expected 3 got { Version } ") ;
79
79
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 12 ) ;
80
80
}
81
81
[ Fact ]
82
82
public void can_read_one_stream ( )
83
83
{
84
- Start ( _stream1 ) ;
84
+ Start ( _stream1 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
85
85
AssertEx . AtLeastModelVersion ( this , 11 , msg : $ "Expected 11 got { Version } ") ;
86
86
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 ) ;
87
87
//confirm checkpoints
@@ -91,8 +91,8 @@ public void can_read_one_stream()
91
91
[ Fact ]
92
92
public void can_read_two_streams ( )
93
93
{
94
- Start ( _stream1 ) ;
95
- Start ( _stream2 ) ;
94
+ Start ( _stream1 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
95
+ Start ( _stream2 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
96
96
AssertEx . AtLeastModelVersion ( this , 22 , msg : $ "Expected 22 got { Version } ") ;
97
97
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 50 ) ;
98
98
//confirm checkpoints
@@ -104,25 +104,25 @@ public void can_read_two_streams()
104
104
[ Fact ]
105
105
public void can_wait_for_one_stream_to_go_live ( )
106
106
{
107
- Start ( _stream1 , null , true ) ;
107
+ Start ( _stream1 , null , true , cancelWaitToken : TestContext . Current . CancellationToken ) ;
108
108
AssertEx . AtLeastModelVersion ( this , 11 , TimeSpan . FromMilliseconds ( 100 ) , msg : $ "Expected 11 got { Version } ") ;
109
109
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 , 100 ) ;
110
110
}
111
111
[ Fact ]
112
112
public void can_wait_for_two_streams_to_go_live ( )
113
113
{
114
- Start ( _stream1 , null , true ) ;
114
+ Start ( _stream1 , null , true , cancelWaitToken : TestContext . Current . CancellationToken ) ;
115
115
AssertEx . AtLeastModelVersion ( this , 11 , TimeSpan . FromMilliseconds ( 100 ) , msg : $ "Expected 11 got { Version } ") ;
116
116
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 , 150 ) ;
117
117
118
- Start ( _stream2 , null , true ) ;
118
+ Start ( _stream2 , null , true , cancelWaitToken : TestContext . Current . CancellationToken ) ;
119
119
AssertEx . AtLeastModelVersion ( this , 21 , TimeSpan . FromMilliseconds ( 100 ) , msg : $ "Expected 21 got { Version } ") ;
120
120
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 50 , 150 ) ;
121
121
}
122
122
[ Fact ]
123
123
public void can_listen_to_one_stream ( )
124
124
{
125
- Start ( _stream1 ) ;
125
+ Start ( _stream1 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
126
126
AssertEx . AtLeastModelVersion ( this , 11 , msg : $ "Expected 11 got { Version } ") ;
127
127
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 ) ;
128
128
//add more messages
@@ -137,8 +137,8 @@ public void can_listen_to_one_stream()
137
137
[ Fact ]
138
138
public void can_listen_to_two_streams ( )
139
139
{
140
- Start ( _stream1 ) ;
141
- Start ( _stream2 ) ;
140
+ Start ( _stream1 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
141
+ Start ( _stream2 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
142
142
AssertEx . AtLeastModelVersion ( this , 22 , msg : $ "Expected 22 got { Version } ") ;
143
143
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 50 ) ;
144
144
//add more messages
@@ -159,7 +159,7 @@ public void can_use_checkpoint_on_one_stream()
159
159
var checkPoint = 8L ; //Zero based, ignore the first 9 events
160
160
Sum = 18 ;
161
161
//start at the checkpoint
162
- Start ( _stream1 , checkPoint ) ;
162
+ Start ( _stream1 , checkPoint , cancelWaitToken : TestContext . Current . CancellationToken ) ;
163
163
//add the one recorded event
164
164
AssertEx . AtLeastModelVersion ( this , 2 , TimeSpan . FromMilliseconds ( 100 ) , msg : $ "Expected 2 got { Version } ") ;
165
165
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 ) ;
@@ -180,8 +180,8 @@ public void can_use_checkpoint_on_two_streams()
180
180
var checkPoint1 = 8L ; //Zero based, ignore the first 9 events
181
181
var checkPoint2 = 5L ; //Zero based, ignore the first 6 events
182
182
Sum = ( 9 * 2 ) + ( 6 * 3 ) ;
183
- Start ( _stream1 , checkPoint1 ) ;
184
- Start ( _stream2 , checkPoint2 ) ;
183
+ Start ( _stream1 , checkPoint1 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
184
+ Start ( _stream2 , checkPoint2 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
185
185
//add the recorded events 2 on stream 1 & 5 on stream 2
186
186
AssertEx . AtLeastModelVersion ( this , 7 , msg : $ "Expected 7 got { Version } ") ;
187
187
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 50 , msg : $ "Expected 50 got { Sum } ") ;
@@ -202,8 +202,8 @@ public void can_listen_to_the_same_stream_twice()
202
202
Assert . Equal ( 0 , Version ) ;
203
203
//weird but true
204
204
//n.b. Don't do this on purpose
205
- Start ( _stream1 ) ;
206
- Start ( _stream1 ) ;
205
+ Start ( _stream1 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
206
+ Start ( _stream1 , cancelWaitToken : TestContext . Current . CancellationToken ) ;
207
207
//double events
208
208
AssertEx . AtLeastModelVersion ( this , 22 , msg : $ "Expected 22 got { Version } ") ;
209
209
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 40 ) ;
0 commit comments