Replies: 2 comments 6 replies
-
Doesn't that code hang forever on |
Beta Was this translation helpful? Give feedback.
1 reply
-
Don't you need to pass a CancellationToken to the service so that it will terminate the loop? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a simple
BackgroundService
in my asp.net 8 web api which performs an hourly backup using anPeriodicTimer
. Here is the code sample,Now I have added unit test to assert the hourly backup behaviour as shown below,
The test assertion is not stable. It passes sometimes and fails sometimes with the following error message
Please can you help me understand what I'm doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions