Saturday, February 28, 2009

Devcathlon: Starter Events Part 2

We got our Devcathlon starter events (http://code.google.com/p/hackystat-ui-devcathlon/wiki/StarterEvents) extended because not everyone was done or something was missing or extra lines code that does not have to be in there. Getting it extended was a good and bad thing – good thing was that the code was reviewed by the professor, P. Johnson, so we know what to change and what to get rid of; bad thing is that this means most of us were not starting ahead of time, delaying the next part of the Devcathlon system.

My starter event is “Pass the Build,” an explanation on my previous blog post. Making things short, it checks data for successful and failed builds. Gives one point for each successful build, deduct one point for each failed build. There are bonus ten points for successful builds and no failure in a seven day period.

Some mistakes I made in my coding, my method names were not meaningful to what they actually do – corrected that, hopefully it is not confusing now. My methods for finding build data was not working because I was not using the correct result types: ‘Failure’ and ‘Success;’ I was using “failed” and “success’ – that is corrected and the methods are working correctly. Lastly, I made test cases for testing out my methods working properly in finding and scoring points for my start event.

A problem came up in Hudson after I committed my files to Devcathlon’s main repository. Hudson failed build after I committed, the error message I notice was this:

[junit] java.sql.SQLException: Failed to start database 'sensorbase',
see the next exception for details.

I did not know how to fix it and it was causing on random test files. So I asked a fellow student, J. Ly, if he have any idea on fixing it. Scratching my head, I came up with this theory that something went down for couple of minutes on Hackystat side (my professor’s Hackystat server).
That theory was proven wrong when I ran automated testing and it was able to contact the “sensorbase database" on my local machine. So I changed some Javadocs in order to have Hudson build again, first two times Hudson failed, but the third time was a charm when everything passed in Hudson. Soooo… I do not know what really happen that cause that error.

No comments: