Skip to content

Commit

Permalink
Fix chaos enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslcarter committed Sep 5, 2024
1 parent f6311bb commit e4ecef3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Mockaco.AspNetCore/Options/ChaosOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ChaosOptions

public ChaosOptions()
{
Enabled = true;
Enabled = false;
ChaosRate = 10;
MinimumLatencyTime = 500;
MaximumLatencyTime = 3000;
Expand Down
23 changes: 12 additions & 11 deletions website/docs/chaos/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ To enable chaos it is necessary to set the 'Enabled' variable to 'true' as shown
...
"Chaos": {
"Enabled": true,
},
},
...
},
```
in ```appsettings.json```.

in `appsettings.json`.

## Types of answers with chaos

Expand All @@ -38,17 +39,17 @@ Parameters are defined inside the Chaos key
"MinimumLatencyTime": 500,
"MaximumLatencyTime": 3000,
"TimeBeforeTimeout": 10000
},
},
...
},
```
in ```appsettings.json```.

in `appsettings.json`.

|Parameter |Description |Default|
|--------------------|-------------------------------------------------------------|-------|
|Enabled |Option to enable and disable chaos (true / false) |true |
|ChaosRate |Percentage of calls affected by chaos (0 - 100) |20 |
|MinimumLatencyTime |Minimum latency in milliseconds when the latency strategy is drawn|500 |
|MaximumLatencyTime |Maximum latency in milliseconds when the latency strategy is drawn|3000 |
|TimeBeforeTimeout |Time in milliseconds before timeout error |10000 |
| Parameter | Description | Default |
| ------------------ | ------------------------------------------------------------------ | ------- |
| Enabled | Option to enable and disable chaos (true / false) | false |
| ChaosRate | Percentage of calls affected by chaos (0 - 100) | 20 |
| MinimumLatencyTime | Minimum latency in milliseconds when the latency strategy is drawn | 500 |
| MaximumLatencyTime | Maximum latency in milliseconds when the latency strategy is drawn | 3000 |
| TimeBeforeTimeout | Time in milliseconds before timeout error | 10000 |

0 comments on commit e4ecef3

Please sign in to comment.