@@ -62,7 +62,7 @@ public void can_start_streams_by_aggregate()
62
62
var s1 = Namer . GenerateForAggregate ( typeof ( TestAggregate ) , aggId ) ;
63
63
AppendEvents ( 1 , _conn , s1 , 7 ) ;
64
64
Start < TestAggregate > ( aggId ) ;
65
- AssertEx . AtLeastModelVersion ( this , 2 , 1000 , msg : $ "Expected 2 got { Version } ") ; // 1 message + CatchupSubscriptionBecameLive
65
+ AssertEx . AtLeastModelVersion ( this , 2 , msg : $ "Expected 2 got { Version } ") ; // 1 message + CatchupSubscriptionBecameLive
66
66
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 7 ) ;
67
67
}
68
68
[ Fact ]
@@ -75,14 +75,14 @@ public void can_start_streams_by_aggregate_category()
75
75
AppendEvents ( 1 , _conn , s2 , 5 ) ;
76
76
Start < ReadModelTestCategoryAggregate > ( null , true ) ;
77
77
78
- AssertEx . AtLeastModelVersion ( this , 3 , 1000 , msg : $ "Expected 3 got { Version } ") ;
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
84
Start ( _stream1 ) ;
85
- AssertEx . AtLeastModelVersion ( this , 11 , 1000 , msg : $ "Expected 11 got { Version } ") ;
85
+ AssertEx . AtLeastModelVersion ( this , 11 , msg : $ "Expected 11 got { Version } ") ;
86
86
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 ) ;
87
87
//confirm checkpoints
88
88
Assert . Equal ( _stream1 , GetCheckpoint ( ) [ 0 ] . Item1 ) ;
@@ -93,7 +93,7 @@ public void can_read_two_streams()
93
93
{
94
94
Start ( _stream1 ) ;
95
95
Start ( _stream2 ) ;
96
- AssertEx . AtLeastModelVersion ( this , 22 , 1000 , msg : $ "Expected 22 got { Version } ") ;
96
+ AssertEx . AtLeastModelVersion ( this , 22 , msg : $ "Expected 22 got { Version } ") ;
97
97
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 50 ) ;
98
98
//confirm checkpoints
99
99
Assert . Equal ( _stream1 , GetCheckpoint ( ) [ 0 ] . Item1 ) ;
@@ -105,29 +105,29 @@ public void can_read_two_streams()
105
105
public void can_wait_for_one_stream_to_go_live ( )
106
106
{
107
107
Start ( _stream1 , null , true ) ;
108
- AssertEx . AtLeastModelVersion ( this , 11 , 100 , msg : $ "Expected 11 got { Version } ") ;
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
114
Start ( _stream1 , null , true ) ;
115
- AssertEx . AtLeastModelVersion ( this , 11 , 100 , msg : $ "Expected 11 got { Version } ") ;
115
+ AssertEx . AtLeastModelVersion ( this , 11 , TimeSpan . FromMilliseconds ( 100 ) , msg : $ "Expected 11 got { Version } ") ;
116
116
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 , 150 ) ;
117
117
118
118
Start ( _stream2 , null , true ) ;
119
- AssertEx . AtLeastModelVersion ( this , 21 , 100 , msg : $ "Expected 21 got { Version } ") ;
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
125
Start ( _stream1 ) ;
126
- AssertEx . AtLeastModelVersion ( this , 11 , 1000 , msg : $ "Expected 11 got { Version } ") ;
126
+ AssertEx . AtLeastModelVersion ( this , 11 , msg : $ "Expected 11 got { Version } ") ;
127
127
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 ) ;
128
128
//add more messages
129
129
AppendEvents ( 10 , _conn , _stream1 , 5 ) ;
130
- AssertEx . AtLeastModelVersion ( this , 21 , 1000 , msg : $ "Expected 21 got { Version } ") ;
130
+ AssertEx . AtLeastModelVersion ( this , 21 , msg : $ "Expected 21 got { Version } ") ;
131
131
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 70 ) ;
132
132
//confirm checkpoints
133
133
Assert . Equal ( _stream1 , GetCheckpoint ( ) [ 0 ] . Item1 ) ;
@@ -139,12 +139,12 @@ public void can_listen_to_two_streams()
139
139
{
140
140
Start ( _stream1 ) ;
141
141
Start ( _stream2 ) ;
142
- AssertEx . AtLeastModelVersion ( this , 22 , 1000 , msg : $ "Expected 22 got { Version } ") ;
142
+ AssertEx . AtLeastModelVersion ( this , 22 , msg : $ "Expected 22 got { Version } ") ;
143
143
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 50 ) ;
144
144
//add more messages
145
145
AppendEvents ( 10 , _conn , _stream1 , 5 ) ;
146
146
AppendEvents ( 10 , _conn , _stream2 , 7 ) ;
147
- AssertEx . AtLeastModelVersion ( this , 42 , 1000 , msg : $ "Expected 42 got { Version } ") ;
147
+ AssertEx . AtLeastModelVersion ( this , 42 , msg : $ "Expected 42 got { Version } ") ;
148
148
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 170 ) ;
149
149
//confirm checkpoints
150
150
Assert . Equal ( _stream1 , GetCheckpoint ( ) [ 0 ] . Item1 ) ;
@@ -161,11 +161,11 @@ public void can_use_checkpoint_on_one_stream()
161
161
//start at the checkpoint
162
162
Start ( _stream1 , checkPoint ) ;
163
163
//add the one recorded event
164
- AssertEx . AtLeastModelVersion ( this , 2 , 100 , msg : $ "Expected 2 got { Version } ") ;
164
+ AssertEx . AtLeastModelVersion ( this , 2 , TimeSpan . FromMilliseconds ( 100 ) , msg : $ "Expected 2 got { Version } ") ;
165
165
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 20 ) ;
166
166
//add more messages
167
167
AppendEvents ( 10 , _conn , _stream1 , 5 ) ;
168
- AssertEx . AtLeastModelVersion ( this , 12 , 100 , msg : $ "Expected 12 got { Version } ") ;
168
+ AssertEx . AtLeastModelVersion ( this , 12 , TimeSpan . FromMilliseconds ( 100 ) , msg : $ "Expected 12 got { Version } ") ;
169
169
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 70 ) ;
170
170
//confirm checkpoints
171
171
Assert . Equal ( _stream1 , GetCheckpoint ( ) [ 0 ] . Item1 ) ;
@@ -181,12 +181,12 @@ public void can_use_checkpoint_on_two_streams()
181
181
Start ( _stream1 , checkPoint1 ) ;
182
182
Start ( _stream2 , checkPoint2 ) ;
183
183
//add the recorded events 2 on stream 1 & 5 on stream 2
184
- AssertEx . AtLeastModelVersion ( this , 7 , 1000 , msg : $ "Expected 7 got { Version } ") ;
184
+ AssertEx . AtLeastModelVersion ( this , 7 , msg : $ "Expected 7 got { Version } ") ;
185
185
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 50 , msg : $ "Expected 50 got { Sum } ") ;
186
186
//add more messages
187
187
AppendEvents ( 10 , _conn , _stream1 , 5 ) ;
188
188
AppendEvents ( 10 , _conn , _stream2 , 7 ) ;
189
- AssertEx . AtLeastModelVersion ( this , 27 , 1000 , msg : $ "Expected 27 got { Version } ") ;
189
+ AssertEx . AtLeastModelVersion ( this , 27 , msg : $ "Expected 27 got { Version } ") ;
190
190
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 170 ) ;
191
191
//confirm checkpoints
192
192
Assert . Equal ( _stream1 , GetCheckpoint ( ) [ 0 ] . Item1 ) ;
@@ -203,11 +203,11 @@ public void can_listen_to_the_same_stream_twice()
203
203
Start ( _stream1 ) ;
204
204
Start ( _stream1 ) ;
205
205
//double events
206
- AssertEx . AtLeastModelVersion ( this , 22 , 1000 , msg : $ "Expected 22 got { Version } ") ;
206
+ AssertEx . AtLeastModelVersion ( this , 22 , msg : $ "Expected 22 got { Version } ") ;
207
207
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 40 ) ;
208
208
//even more doubled events
209
209
AppendEvents ( 10 , _conn , _stream1 , 5 ) ;
210
- AssertEx . AtLeastModelVersion ( this , 42 , 2000 , msg : $ "Expected 42 got { Version } ") ;
210
+ AssertEx . AtLeastModelVersion ( this , 42 , TimeSpan . FromSeconds ( 2 ) , msg : $ "Expected 42 got { Version } ") ;
211
211
AssertEx . IsOrBecomesTrue ( ( ) => Sum == 140 ) ;
212
212
}
213
213
0 commit comments