Skip to content

Commit

Permalink
Reduce heartbeat timeout for flaky test (#2351)
Browse files Browse the repository at this point in the history
* Reduce heartbeat timeout for flaky test

* Reduce heartbeat count
  • Loading branch information
yux0 authored Jan 7, 2022
1 parent d01b1c7 commit b0e2c05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions host/client_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ func (s *clientIntegrationSuite) Test_ActivityTimeouts() {
// so here, we reduce the duration between two heartbeats, so that they are
// more likey be sent in the heartbeat batch at 1.6s
// (basically increasing the room for delay in heartbeat goroutine from 0.1s to 1s)
for i := 0; i < 4; i++ {
for i := 0; i < 3; i++ {
activity.RecordHeartbeat(ctx, i)
time.Sleep(200 * time.Millisecond)
}
Expand Down Expand Up @@ -525,7 +525,7 @@ func (s *clientIntegrationSuite) Test_ActivityTimeouts() {
ctx4 := workflow.WithActivityOptions(ctx, workflow.ActivityOptions{
ActivityID: "Heartbeat",
StartToCloseTimeout: 10 * time.Second,
HeartbeatTimeout: 2 * time.Second,
HeartbeatTimeout: 1 * time.Second,
RetryPolicy: noRetryPolicy,
})
f4 := workflow.ExecuteActivity(ctx4, activityFn)
Expand Down Expand Up @@ -594,7 +594,7 @@ func (s *clientIntegrationSuite) Test_ActivityTimeouts() {
s.True(timeoutErr.HasLastHeartbeatDetails())
var v int
s.NoError(timeoutErr.LastHeartbeatDetails(&v))
s.Equal(3, v)
s.Equal(2, v)

//s.printHistory(id, workflowRun.GetRunID())
}
Expand Down

0 comments on commit b0e2c05

Please sign in to comment.