-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
H2 test case for corrupted file #3944
Comments
Please, write a test case without any third-party dependencies. |
The code has been updated to only use the JDK 11 and H2. |
@sdmoralesma |
Yes, it isn't easy. I can't tell exactly how many times are required to get a corrupted DB, sometimes happens after 10-12 runs, but other times I can execute dozens of times and still have a valid database. |
I've attached a test case that creates a corrupted database file. I want some guidance to avoid such a problem. In summary, the test case is designed to load the database with a batch-insert every millisecond using an executor service that holds 50 threads (each one using a connection from the pool) that try to write to the database and interrupt the processing with a Timer.
The issue is not easy to reproduce and happens rarely, so it means that the test case needs to run multiple times.
Uses JDK11 and H2 2.2.224
To execute you can use:
The text was updated successfully, but these errors were encountered: