Skip to content

Conversation

@JoshLove-msft
Copy link
Member

@JoshLove-msft JoshLove-msft commented Jul 3, 2020

Fixes #13062

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft JoshLove-msft marked this pull request as ready for review July 4, 2020 05:35
@JoshLove-msft JoshLove-msft requested a review from pakrym July 4, 2020 21:14
await processor.StartProcessingAsync();
var stopwatch = Stopwatch.StartNew();
while (stopwatch.Elapsed.TotalSeconds <= 10)
while (stopwatch.Elapsed.TotalSeconds <= 30)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it may have some non-determinism due to the timings. You may want to consider setting a TaskCompletionSource in your exception handler and awaiting that here with a Task.WaitAny timeout. I'd also advise allowing for a few minutes in that timeout due to how things run in CI. (Event Hubs had some issues with shorter timeouts like this when parallelism caused a test to suspend for longer than we expected)

To illustrate, I'm thinking something like:

using var cancellationSource = new CancellationTokenSource();
cancellationSource.CancelAfter(ServiceBusTestEnvironment.Instance.TestExecutionTimeLimit);

// stuff...

await Task.WhenAny(exceptionHandlerCalledSource.Task, Task.Delay(Timeout.Infinite, cancellationSource.Token));
Assert.That(cancellationSource.IsCancellationRequested, Is.False, "The cancellation token should not have been signaled.");
cancellationSource.Cancel();

// stuff...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair - this was copied wholesale from Track 1. If there is any more flakiness I will make this update.

@JoshLove-msft JoshLove-msft merged commit b02b47b into Azure:master Jul 6, 2020
prmathur-microsoft pushed a commit that referenced this pull request Jul 8, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-net that referenced this pull request Mar 2, 2021
Update python track2 sdk for deviceupdate (Azure#13223)

* Update python track2 sdk for deviceupdate

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Flaky Test] AutoLockRenewalWorks

2 participants