Skip to content

Commit

Permalink
temporarily disable TestNumPollersCounter while I look into why it's …
Browse files Browse the repository at this point in the history
…flaking (#1826)
  • Loading branch information
yuandrew authored Feb 14, 2025
1 parent b19fc66 commit f223359
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2896,35 +2896,35 @@ func (ts *IntegrationTestSuite) waitForQueryTrue(run client.WorkflowRun, query s
ts.True(result, "query didn't return true in reasonable amount of time")
}

func (ts *IntegrationTestSuite) TestNumPollersCounter() {
_, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
assertNumPollersEventually := func(expected float64, pollerType string, tags ...string) {
// Try for two seconds
var lastCount float64
for start := time.Now(); time.Since(start) <= 10*time.Second; {
lastCount = ts.metricGauge(
metrics.NumPoller,
"poller_type", pollerType,
"task_queue", ts.taskQueueName,
)
if lastCount == expected {
return
}
time.Sleep(50 * time.Millisecond)
}
// Will fail
ts.Equal(expected, lastCount)
}
if ts.config.maxWorkflowCacheSize == 0 {
assertNumPollersEventually(2, "workflow_task")
assertNumPollersEventually(0, "workflow_sticky_task")
} else {
assertNumPollersEventually(1, "workflow_task")
assertNumPollersEventually(1, "workflow_sticky_task")
}
assertNumPollersEventually(2, "activity_task")
}
//func (ts *IntegrationTestSuite) TestNumPollersCounter() {
// _, cancel := context.WithTimeout(context.Background(), 10*time.Second)
// defer cancel()
// assertNumPollersEventually := func(expected float64, pollerType string, tags ...string) {
// // Try for two seconds
// var lastCount float64
// for start := time.Now(); time.Since(start) <= 10*time.Second; {
// lastCount = ts.metricGauge(
// metrics.NumPoller,
// "poller_type", pollerType,
// "task_queue", ts.taskQueueName,
// )
// if lastCount == expected {
// return
// }
// time.Sleep(50 * time.Millisecond)
// }
// // Will fail
// ts.Equal(expected, lastCount)
// }
// if ts.config.maxWorkflowCacheSize == 0 {
// assertNumPollersEventually(2, "workflow_task")
// assertNumPollersEventually(0, "workflow_sticky_task")
// } else {
// assertNumPollersEventually(1, "workflow_task")
// assertNumPollersEventually(1, "workflow_sticky_task")
// }
// assertNumPollersEventually(2, "activity_task")
//}

func (ts *IntegrationTestSuite) TestSlotsAvailableCounter() {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
Expand Down

0 comments on commit f223359

Please sign in to comment.