On Wed, Jan 19, 2011 at 05:06:56PM -0600, Tim Donohue wrote:
> In the Unit Testing, the Database is initialized by:
> 
> MockDatabaseManager.initialize()
> 
> Which in turn calls 'database_schema.sql' to initialize the database 
> tables, etc.  The 'database_schema.sql' file is provided in 
> /src/test/resources/.
> 
> This initialize() method is called the first time 
> 'MockDatabaseManager.getConnection()' is called.  Which in turn is 
> called whenever a SQL statement is run against the database.
> 
> At least, that's what I've been able to figure out, so far :)
> 
> I hope that helps.

Thank you.  Thatt gave me a name to look for.  AbstractUnitTest declares
@UsingMocksAndStubs({MockDatabaseManager...}).  In initOnce() at line
135 it calls MetadataField.find(), and that eventually triggers the
creation of the schema in MockDatabaseManager.initialize().

But this doesn't seem to happen when I run tests manually; it only
happens when I run them through Maven.  The hunt is on....

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Asking whether markets are efficient is like asking whether people are smart.

Attachment: pgpUMVNWSKgC6.pgp
Description: PGP signature

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to