Whats up with Hatim!

life, musings and rants of a Pakistani Software Developer

OpenNMS Poller Tests

Posted by hatim Tue, 01 Jul 2008 17:39:00 GMT

For past few days I have been working on OpenNMS poller tests. I have to adapt the curretn tests so that they can better utilize the Hibernate upgradation i am taked for do for my SoC project. A quick grep led me to find the following java files in my svn branch.

Under trunk/opennms-services/

src/test/java/org/opennms/netmgt/config/PollerConfigFactoryTest.java
src/test/java/org/opennms/netmgt/config/PollerConfigManagerTest.java
src/test/java/org/opennms/netmgt/mock/MockPollerConfigTest.java
src/test/java/org/opennms/netmgt/poller/PollerTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerBackEndIntegrationTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerBackEndTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerFrontEndIntegrationTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerFrontEndTest.java

Under trunk/opennms-webapp/

src/test/java/org/opennms/web/services/PollerServiceTest.java

I have skipped remote poller tests for now. I have started with PollerTest as it seems to be the most obvious. As per suggestions of OpenNMS community I am extending this Test class from AbstractTransactionalDaoTestCase. But since AbstractTransactionalDataSourceSpringContextTests comes in its parent hierarchy, which sets setUp and tearDown as final. This means that eiteher a new way of setUp and tearDown have to be figured out, or spring context has to be provided from with in the indivisual tests. I think the second way means much of boilerplate code in different unrelated places and hence duplication.

I am still updating the code, more to come on this blog entry.

Posted in  | Tags , ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://hatimonline.com/blog/trackbacks?article_id=opennms-poller-tests&day=01&month=07&year=2008

(leave url/email »)

   Preview comment