Skip to content

Commit

Permalink
Simulate process crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
smhlana committed Jun 20, 2023
1 parent 04ccd01 commit d9a2061
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Services/CosmosDbService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ public async Task<IEnumerable<Item>> GetItemsAsync(string queryString)
}

var crashVar = 0;
while(true)
try
{
crashVar = 1000000/crashVar;
while (true)
{
crashVar = 1000000 / crashVar;
}
}
catch (System.DivideByZeroException)
{
throw;
}

//throw new CosmosException("Process crash exception", System.Net.HttpStatusCode.TooManyRequests, 500, "123", 0.1);
Expand Down

0 comments on commit d9a2061

Please sign in to comment.