OctopusDeploy / Halibut

| Public | A secure communication stack for .NET using JSON-RPC over SSL.
Other
12 stars 44 forks source link

Fixing RelyOnConnectionTimeoutsInsteadOfPollingRequestMaximumMessageProcessingTimeout bug #587

Closed sburmanoctopus closed 9 months ago

sburmanoctopus commented 9 months ago

Background

While testing the operation cancellation work, we found that if the RelyOnConnectionTimeoutsInsteadOfPollingRequestMaximumMessageProcessingTimeout feature toggle was used, it would cause the PendingRequestQueueAsync to wait forever for the queue item to be dequeued instead of timing out.

Results

Before

In WaitForResponseToBeSet, the relyOnConnectionTimeoutsInsteadOfPollingRequestMaximumMessageProcessingTimeout flag was being used to wait forever always.

Whereas it should not do this when we call WaitForResponseToBeSet initially (i.e. when we are waiting for the item to be dequeued), and should be used only when we call WaitForResponseToBeSet the second time (i.e. when we are allowing time for the tentacle to process the message).

After

The flag has been moved out of WaitForResponseToBeSet so that it can be used in the appropriate spot. A test was written beforehand to prove the bug.

How to review this PR

Quality :heavy_check_mark:

Pre-requisites