Skip to content
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

Test Quiescent Checkpointing #9

Open
couger01 opened this issue Nov 15, 2017 · 0 comments
Open

Test Quiescent Checkpointing #9

couger01 opened this issue Nov 15, 2017 · 0 comments
Assignees

Comments

@couger01
Copy link
Owner

Testing quiescent checkpointing is difficult on the best of days. To test this project you are to write two Unit Test programs to test quiescent checkpointing. Call the first Java class "QCPUnitTest1" and the second "QCPUnitTest2". Put both source code files in the simpledb.tx Test package. Here are the unit tests you should write.

QCPUnitTest1 - Create 10 transactions in 10 different threads. Don't commit any of them right away (i.e. make all of them sleep for a little while). Then create 5 more transactions in their own threads. All 5 should get queued up on the wait list while waiting to do the checkpoint. Then the original 10 should complete, the checkpoint should occur, and the final 5 threads should complete.
QCPUnitTest2 - This is a variant of QCPUnitTest1 where no other transactions wait after the initial 10. They should all wait to commit so the checkpoint is delayed. Then the first 10 should complete and the checkpoint should occur.
See section 14.6 (p.422) of the text to see how you might write a unit test for transactions.

Be sure to execute both your unit tests and a system test while developing this code and before you turn it in.

@couger01 couger01 self-assigned this Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant