-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce
RetryAttribute
for test methods
- Loading branch information
1 parent
63ec778
commit 077b03b
Showing
24 changed files
with
409 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/TestFramework/TestFramework/Attributes/TestMethod/DelayBackoffType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
/// <summary> | ||
/// Specifies a backoff type for the delay between retries. | ||
/// </summary> | ||
public enum DelayBackoffType | ||
{ | ||
/// <summary> | ||
/// Specifies a constant backoff type. Meaning the delay between retries is constant. | ||
/// </summary> | ||
Constant, | ||
|
||
/// <summary> | ||
/// Specifies an exponential backoff type. | ||
/// The delay is calculated as the base delay * 2^(n-1) where n is the retry attempt. | ||
/// For example, if the base delay is 1000ms, the delays will be 1000ms, 2000ms, 4000ms, 8000ms, etc. | ||
/// </summary> | ||
Exponential, | ||
} |
Oops, something went wrong.