[hibernate-dev] unit test PSA

Emmanuel Bernard emmanuel at hibernate.org
Tue Aug 6 04:16:19 EDT 2013


What's PSA? Pakistan Society of Anaesthesiologists?
http://www.acronymfinder.com/PSA.html

Emmanuel

On Mon 2013-08-05 16:49, Brett Meyer wrote:
> A friendly PSA regarding unit tests...
> 
> I spent the afternoon cleaning up tests that were failing in our matrix CI job.  There were lots of failures on various DBs due to the following:
> 
> 1.) Columns referenced by a UK/PK must NOT be nullable.
> 2.) Tests that solely use ConnectionProviderBuilder in the Configuration (pure unit tests, not functional tests) should use "@RequiresDialectFeature( value = ConnectionProviderBuilder.class )".  ConnectionProviderBuilder now extends DialectCheck.  The Dialect used by ConnectionProviderBuilder (currently H2) will therefore be required and all others skipped.
> 3.) Avoid the use of reserved keywords ("User", "Table", "Comment", etc.).  If it seems like it's possible for it to be reserved somewhere, please avoid.
> 4.) Table and column name lengths, including collection tables, should be less than 30 characters.  This was mainly an issue with entities embedded in the test class (implicit name is ParentClass$SubClass).
> 
> https://hibernate.atlassian.net/browse/HHH-8420
> 
> If everyone could keep those in mind, I'd sincerely appreciate it.  It removes time-consuming debugging later on (although I realize that most of those are very dialect-specific).  Thanks!
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list