You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: