Skip to content

[DEBUG] Flaky test - Batch receiver disconnect - 100 iterations#13339

Closed
HarshaNalluru wants to merge 11 commits intoAzure:masterfrom
HarshaNalluru:harshan/sb/issue/disconnect-flaky-test
Closed

[DEBUG] Flaky test - Batch receiver disconnect - 100 iterations#13339
HarshaNalluru wants to merge 11 commits intoAzure:masterfrom
HarshaNalluru:harshan/sb/issue/disconnect-flaky-test

Conversation

@HarshaNalluru
Copy link
Copy Markdown
Contributor

No description provided.

@ghost ghost added the Service Bus label Jan 22, 2021
@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru HarshaNalluru changed the title [DEBUG] Flaky test - Batch receiver disconnect - 1000 iterations [DEBUG] Flaky test - Batch receiver disconnect - 100 iterations Jan 23, 2021
@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

#13374 closes this

ghost pushed a commit that referenced this pull request Jan 26, 2021
## Bug
- `receiveMessages` method returned zero messages upon a connection refresh caused by a network disconnect(simulated in the test). 
- `OperationTimeout` error on message settlement after the disconnect

These two failures made the "disconnect" test occasionally fail for the batching receiver.

## Cause
`onDetached` on the batchReceivers is called 300ms after the connection refresh causing the recovered receive link to be closed.

- If the message returned from the service took close to 300ms until reached the receiver since the refresh, `onDetached` is called to close the link leading to the loss of messages.
- If the 300ms had elapsed right before the settlement, we'd see the OperationTimeout error on settlement since the receive link is closed.

Investigated here #13339

## Fix
- Call `onDetached` for the batching receivers before calling the refresh connection
- And retain calling `onDetached` for the streaming receivers after the refresh connection

## Changes in the PR
- [x] Refactored "calling onDetached" part
- [x] Removed the 300ms delay since we don't see the utility
- [x] Changelog
- [x] TODO: What to do for sessions?
   - [x] Needs more investigation #13374 (comment), will be handled at #8875
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant