~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/connections/BasicConnectionProviderTest.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// $Id: BasicConnectionProviderTest.java 10976 2006-12-12 23:22:26Z steve.ebersole@jboss.com $
 
2
package org.hibernate.test.connections;
 
3
 
 
4
import junit.framework.Test;
 
5
 
 
6
import org.hibernate.ConnectionReleaseMode;
 
7
import org.hibernate.Session;
 
8
import org.hibernate.cfg.Configuration;
 
9
import org.hibernate.cfg.Environment;
 
10
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
 
11
 
 
12
/**
 
13
 * Implementation of BasicConnectionProviderTest.
 
14
 *
 
15
 * @author Steve Ebersole
 
16
 */
 
17
public class BasicConnectionProviderTest extends ConnectionManagementTestCase {
 
18
 
 
19
        public BasicConnectionProviderTest(String name) {
 
20
                super( name );
 
21
        }
 
22
 
 
23
        public static Test suite() {
 
24
                return new FunctionalTestClassTestSuite( BasicConnectionProviderTest.class );
 
25
        }
 
26
 
 
27
        protected Session getSessionUnderTest() {
 
28
                return openSession();
 
29
        }
 
30
 
 
31
        protected void reconnect(Session session) {
 
32
                session.reconnect();
 
33
        }
 
34
 
 
35
        public void configure(Configuration cfg) {
 
36
                super.configure( cfg );
 
37
                cfg.setProperty( Environment.RELEASE_CONNECTIONS, ConnectionReleaseMode.ON_CLOSE.toString() );
 
38
        }
 
39
}