File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
artio-system-tests/src/test/java/uk/co/real_logic/artio/system_tests Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 25
25
import org .junit .runner .RunWith ;
26
26
import org .junit .runners .Parameterized ;
27
27
import org .junit .runners .Parameterized .Parameters ;
28
+
28
29
import uk .co .real_logic .artio .Timing ;
29
30
import uk .co .real_logic .artio .builder .Encoder ;
30
31
import uk .co .real_logic .artio .builder .LogonEncoder ;
@@ -173,16 +174,16 @@ private void sessionBecomesSlow()
173
174
assertTrue (session .isSlowConsumer ());
174
175
}
175
176
176
- private void sendMessage ()
177
+ private long sendMessage ()
177
178
{
178
179
if (sendMetadata )
179
180
{
180
181
metadata .putInt (0 , session .lastSentMsgSeqNum () + 1 );
181
- session .trySend (testRequest , metadata , 0 );
182
+ return session .trySend (testRequest , metadata , 0 );
182
183
}
183
184
else
184
185
{
185
- session .trySend (testRequest );
186
+ return session .trySend (testRequest );
186
187
}
187
188
}
188
189
Original file line number Diff line number Diff line change @@ -80,15 +80,17 @@ public TestSystem awaitTimeoutInMs(final long awaitTimeoutInMs)
80
80
return this ;
81
81
}
82
82
83
- public void poll ()
83
+ public int poll ()
84
84
{
85
+ int resultInvokeFramer = 0 ;
85
86
if (scheduler != null )
86
87
{
87
- scheduler .invokeFramer ();
88
- scheduler .invokeFramer ();
88
+ resultInvokeFramer = scheduler .invokeFramer ();
89
89
}
90
- libraries .forEach ((library ) -> library .poll (LIBRARY_LIMIT ));
90
+ final int result = resultInvokeFramer + libraries .stream ().mapToInt ((library ) ->
91
+ library .poll (LIBRARY_LIMIT )).sum ();
91
92
operations .forEach (Runnable ::run );
93
+ return result ;
92
94
}
93
95
94
96
public void addOperation (final Runnable operation )
You can’t perform that action at this time.
0 commit comments