Skip to content

Commit 3fb334e

Browse files
committed
Test with more values
1 parent 4fa8d2e commit 3fb334e

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

core/src/worker/workflow/wft_poller.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ impl WFTPollerShared {
104104
if is_sticky {
105105
self.wait_for_first_nonsticky_poll.notified().await;
106106
}
107-
info!(
108-
"Waiting if needed. Sticky: {} / backlog {}",
109-
is_sticky,
110-
*self.last_seen_sticky_backlog.0.borrow()
111-
);
112107
// If there's a sticky backlog, prioritize it.
113108
if !is_sticky {
114109
let backlog = *self.last_seen_sticky_backlog.0.borrow();
@@ -127,12 +122,6 @@ impl WFTPollerShared {
127122
if let Some((sticky_active, non_sticky_active)) =
128123
self.sticky_active.get().zip(self.non_sticky_active.get())
129124
{
130-
info!(
131-
"Balance (sticky {}), non-sticky {} sticky {}",
132-
is_sticky,
133-
*non_sticky_active.borrow(),
134-
*sticky_active.borrow()
135-
);
136125
if is_sticky {
137126
let _ = sticky_active
138127
.clone()
@@ -147,7 +136,6 @@ impl WFTPollerShared {
147136
})
148137
.await;
149138
}
150-
info!("Done balance (sticky {})", is_sticky);
151139
}
152140
}
153141
}

tests/integ_tests/polling_tests.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,20 @@ async fn switching_worker_client_changes_poll() {
209209
server2.shutdown().await.unwrap();
210210
}
211211

212+
#[rstest::rstest]
212213
#[tokio::test]
213-
async fn only_one_workflow_slot_and_two_pollers() {
214+
async fn small_workflow_slots_and_pollers(
215+
#[values(1, 2)] wft_slots: usize,
216+
#[values(1, 2)] wft_pollers: usize,
217+
) {
214218
let wf_name = "only_one_workflow_slot_and_two_pollers";
215219
let mut starter = CoreWfStarter::new(wf_name);
216220
starter
217221
.worker_config
218-
.max_outstanding_workflow_tasks(2_usize)
222+
.max_outstanding_workflow_tasks(wft_slots)
219223
.max_outstanding_local_activities(1_usize)
220224
.activity_task_poller_behavior(PollerBehavior::SimpleMaximum(1))
221-
.workflow_task_poller_behavior(PollerBehavior::SimpleMaximum(2))
225+
.workflow_task_poller_behavior(PollerBehavior::SimpleMaximum(wft_pollers))
222226
.max_outstanding_activities(1_usize);
223227
let mut worker = starter.worker().await;
224228
worker.register_wf(wf_name.to_owned(), |ctx: WfContext| async move {
@@ -236,7 +240,7 @@ async fn only_one_workflow_slot_and_two_pollers() {
236240
worker.register_activity("echo_activity", echo);
237241
worker
238242
.submit_wf(
239-
wf_name.to_string(),
243+
starter.get_task_queue(),
240244
wf_name.to_owned(),
241245
vec![],
242246
WorkflowOptions::default(),

0 commit comments

Comments
 (0)