New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: the StdSchedulerFactory.GetDefaultScheduler method is not thread… #3212
Conversation
Why is it not thread-safe? |
Run two unit test at the same time the, it will throw exception: Scheduler with name 'DefaultQuartzScheduler' already exists. because the AbpIntegratedTestBase class execute InitializeAbp twice |
The test that you added passes. |
Adding lock ensures that it's not called concurrently. However, it will be executed twice anyway. Isn't that a problem? |
I think it's only going to happen in unit tests |
The test that you added passes without your change. |
@acjh are you sure? If I delete my change , run the test will throw exception |
System.AggregateException : 发生一个或多个错误。 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
the StdSchedulerFactory.GetDefaultScheduler method is not thread safe,need lock