DESCRIPTION

Adding test for checkpoint with failover

Change-Id: Ia02960513314a5bc03da8c44e385956b43dab41c


COMMENTS

author: Kenny Maynard
date: 2012-05-16 20:19:34.172000000

Patch Set 1: I would prefer that you didn't submit this

(10 inline comments)



Line:7, conf/py-checkpoint.conf -> Please use items instead of howMany

Line:182, pytests/checkpoint.py -> Split this over two lines.

Line:186, pytests/checkpoint.py -> No need for \n in this log message.

Line:201, pytests/checkpoint.py -> Do not use print.

Line:203, pytests/checkpoint.py -> No need for \n in this log message.

Line:209, pytests/checkpoint.py -> This failover looks incorrect. In the failover function you are catching an Exception and logging it. Here you are not checking the result of the failover function and just proceeding meaning that you will proceed whether the failover is successful or not.

Line:218, pytests/checkpoint.py -> No need for \n in this log message.

Line:314, pytests/checkpoint.py -> Seems like result could be undefined here if there is an exception.

Line:316, pytests/checkpoint.py -> This function seems to do exactly what the StatsWaitTask does. If that task is not working for this situation then I didn't write it correctly. Can you explain why you need the _get_checkpoint_stats() function.

Line:343, pytests/checkpoint.py -> This should be "return int(new_items / self.chk_size)"

-------------------------------------
author: Amani Conrad
date: 2012-05-16 20:26:35.204000000

Patch Set 1: (7 inline comments)



Line:182, pytests/checkpoint.py -> Done

Line:186, pytests/checkpoint.py -> Done

Line:201, pytests/checkpoint.py -> Done

Line:203, pytests/checkpoint.py -> Done

Line:209, pytests/checkpoint.py -> Yes, you are right. I had a check in there earlier, which asserted True for this. I ll add it here.

Line:218, pytests/checkpoint.py -> Done

Line:314, pytests/checkpoint.py -> true. Editing this one.

-------------------------------------
author: Amani Conrad
date: 2012-05-16 21:57:33.928000000

Patch Set 1: (2 inline comments)



Line:316, pytests/checkpoint.py -> This is different from StatsWaitTask wrt to the tasks - specifically the "cluster.async_wait_for_stats" task. The earlier run w/ StatsWaitTask timed-out while collecting stats from the master node.Also this function was likely to change(?).. So we agreed it would be a better idea to write another separate function to read the stats here and use it for this function.

Line:343, pytests/checkpoint.py -> ok

-------------------------------------
author: Kenny Maynard
date: 2012-05-16 22:06:07.481000000

Patch Set 1: (1 inline comment)



Line:316, pytests/checkpoint.py -> The change I made is very minor and something I can easily refactor for you in less than 5 minutes. The function you wrote here gets the current checkpoint stats and then compares them over a time period of 60 seconds to the stats that are on the server. This is exactly what the async_wait_for_stats() function does. You can wait for my changes to go through before fixing this if you want, but this is duplication of code is what we are trying to avoid.

-------------------------------------
author: Kenny Maynard
date: 2012-05-16 22:07:14.796000000

Patch Set 1: (1 inline comment)



Line:316, pytests/checkpoint.py -> If you choose to leave this for now then you need to file a bug that says you will fix it later.

-------------------------------------
author: Kenny Maynard
date: 2012-05-16 22:55:56.627000000

Patch Set 1: (1 inline comment)



Line:167, pytests/checkpoint.py -> One last thing. Can you write a description of what this test case does as a comment above this test case. I will do the same for the test cases I wrote in another commit.

-------------------------------------
