charlesdong1991 commented on code in PR #3694:
URL: https://github.com/apache/fluss/pull/3694#discussion_r3610840498
##########
fluss-rust/crates/fluss/tests/integration/log_table.rs:
##########
@@ -560,7 +560,15 @@ mod table_test {
.create_record_batch_log_scanner()
.unwrap();
proj.subscribe(0, 0).await.unwrap();
- let proj_batches = proj.poll(Duration::from_secs(10)).await.unwrap();
+ let mut proj_batches = Vec::new();
+ let deadline = tokio::time::Instant::now() + Duration::from_secs(10);
+ while proj_batches.is_empty() && tokio::time::Instant::now() <
deadline {
Review Comment:
Nit: since this pattern (aka set a deadline, and check conditions after
poll) has appeared quite several times in tests, maybe can use a small helper
function like `poll_until_nonempty` or something to reuse
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]