Giter VIP home page Giter VIP logo

retry-master's Issues

[BUG] `ExponentialRandomBackoffPolicy` Does Not Exponentially Increase Backoff Time

Describe the bug

The ExponentialRandomBackoffPolicy in the library does not seem to exponentially increase the backoff time as expected.

Steps to Reproduce

Here's an example of how this behavior can be reproduced:

  1. Instantiate an ExponentialRandomBackoffPolicy.
  2. Execute a failing operation wrapped in this backoff policy.
  3. Monitor the backoff times between retries and observe that they do not increase exponentially.

Expected behavior

The backoff time should increase exponentially between retries when using ExponentialRandomBackoffPolicy.

Environment (please complete the following information):

Actual Output / Stack Trace

There isn't an error message or stack trace for this issue, but the behavior can be observed by monitoring the backoff times between retries.

Additional context

The current behavior of ExponentialRandomBackoffPolicy contradicts the expected functionality of this policy, which should provide an exponential backoff time between retries.

[BUG] `NonRepeatingRetryPolicy` Fails to Retry

Describe the bug

When using the NonRepeatingRetryPolicy in the library, the action does not retry as expected. The last exception stored in the RetryContext is set before checking if the current exception is different than the last, causing the retry mechanism to fail.

Steps to Reproduce

Here's an example of how this behavior can be reproduced:

  1. Instantiate a NonRepeatingRetryPolicy.
  2. Execute a failing operation that throws different exceptions in each attempt.
  3. Observe that the operation does not retry, even though the exceptions are different.

Expected behavior

The action should retry if the current exception is different than the last exception.

Environment (please complete the following information):

Actual Output / Stack Trace

There isn't an error message or stack trace for this issue, but the behavior can be observed by the absence of retries despite different exceptions being thrown.

Additional context

This issue affects operations that rely on NonRepeatingRetryPolicy for handling retries. The current behavior contradicts the expected functionality of this policy, which should allow retries when different exceptions are thrown.

[BUG] `MaxAttemptsRetryPolicy` and `TimeoutRetryPolicy` Lack Default Values

Describe the bug

MaxAttemptsRetryPolicy and TimeoutRetryPolicy in the RetryMaster library do not have default values, unlike the other policies where default values are provided when it makes sense.

Steps to Reproduce

Here's an example of how this behavior can be reproduced:

  1. Try to instantiate MaxAttemptsRetryPolicy or TimeoutRetryPolicy without providing arguments.
  2. An error or unexpected behavior occurs because these classes do not have default values.

Expected behavior

Consistent with other policies in the library, MaxAttemptsRetryPolicy and TimeoutRetryPolicy should have reasonable default values.

Environment (please complete the following information):

Actual Output / Stack Trace

There isn't an error message or stack trace for this issue, but the absence of default values can lead to unexpected behavior or failure to instantiate these classes.

Additional context

The lack of default values for MaxAttemptsRetryPolicy and TimeoutRetryPolicy creates an inconsistency in the library's interface and could lead to user errors.

[BUG] Some Retry Policies Retry One Time Less Than Specified

Describe the bug

When using MaxAttemptsRetryPolicy and SimpleRetryPolicy in the library, the action is retried one time less than specified in constructor parameter.

Here's an example of how this behavior can be reproduced:

  1. Instantiate a MaxAttemptsRetryPolicy or SimpleRetryPolicy with a maximum attempts value of n.
  2. Execute a failing operation wrapped in this retry policy.
  3. Observe that the operation is retried n-1 times, instead of n times as expected.

Expected behavior

The action should be retried n times, where n is the maximum attempts value set in the retry policy.

Environment (please complete the following information):

Actual Output / Stack Trace

There isn't an error message or stack trace for this issue, but the behavior can be observed by counting the number of retries that occur for a failing operation.

Additional context

This issue affects the reliability of operations that rely on MaxAttemptsRetryPolicy and SimpleRetryPolicy for handling retries. It's important to ensure that the number of retries matches the expected value to maintain the integrity of these operations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.