Jonathan,

PopulatedTemporaryDatabaseTestCase populates the database with just the
OpenNMS schema (tables, indexes, etc.), but no data in the tables. 
You'll have to do that yourself or add to initializeDatabase() in
PopulatedTemporaryDatabaseTestCase.  There might be unintended
consequences of doing the latter, so I'd stick with doing it yourself
for now.

For what it's worth, these seem to be the only inserts in create.sql:

dhcp-1-122:opennms dgregor$ egrep -i '^insert'
opennms-base-assembly/src/main/filtered/etc/create.sql 
insert into categories values (nextVal('catNxtId'), 'Routers', null);
insert into categories values (nextVal('catNxtId'), 'Switches', null);
insert into categories values (nextVal('catNxtId'), 'Servers', null);
insert into categories values (nextVal('catNxtId'), 'Production', null);
insert into categories values (nextVal('catNxtId'), 'Test', null);
insert into categories values (nextVal('catNxtId'), 'Development',
null);
insert into distPoller (dpName, dpIP, dpComment, dpDiscLimit,
dpLastNodePull, dpLastEventPull, dpLastPackagePush, dpAdminState,
dpRunState) values ('localhost', '127.0.0.1', 'This is the default
poller.', 0.10, null, null, null, 1, 1);
INSERT INTO qrtz_locks values('TRIGGER_ACCESS');
INSERT INTO qrtz_locks values('JOB_ACCESS');
INSERT INTO qrtz_locks values('CALENDAR_ACCESS');
INSERT INTO qrtz_locks values('STATE_ACCESS');
INSERT INTO qrtz_locks values('MISFIRE_ACCESS');



        - djg

On Sat, 06 Feb 2010 23:56 +0000, "jonathan sartin"
<jonat...@opennms.org> wrote:
> Hi Chaps,
> 
> I have a persistent failing set of tests - see
> http://bamboo.internal.opennms.com:8085/browse/OPENNMS-FEATUREREPORTINGAPI-23/test/org.opennms.web.svclayer.DefaultOutageServiceIntegrationTest
>  
>   for and example of what I mean.
> 
> I think my create.sql foo is not up to the job. I'm missing a some  
> rows that I reckon I should have inserted by opennms-base-assembly/src/ 
> main/filtered/etc/create.sql with the following lines:
> 
> --##################################################################
> --# The following command should populate the qrtz_locks table
> --# are no categories in the category table
> --##################################################################
> --# criteria: SELECT count(*) = 0 from qrtz_locks
> insert into qrtz_locks values('TRIGGER_ACCESS');
> --# criteria: SELECT count(*) = 0 from qrtz_locks
> insert into qrtz_locks values('JOB_ACCESS');
> --# criteria: SELECT count(*) = 0 from qrtz_locks
> insert into qrtz_locks values('CALENDAR_ACCESS');
> --# criteria: SELECT count(*) = 0 from qrtz_locks
> insert into qrtz_locks values('STATE_ACCESS');
> --# criteria: SELECT count(*) = 0 from qrtz_locks
> insert into qrtz_locks values('MISFIRE_ACCESS');
> 
> It's driving my quietly crazy. I know this works with liquibase, so I  
> wonder what could be the issue?
> 
> I could really use some help from anyone who's more familiar with  
> those tests, and with create.sql syntax in general.
> 
> Cheers ... J
> 
> 
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call
> away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
> 
> opennms-devel mailing list
> 
> To *unsubscribe* or change your subscription options, see the bottom of
> this page:
> https://lists.sourceforge.net/lists/listinfo/opennms-devel

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to