Package com.zaxxer.hikari

Source Code of com.zaxxer.hikari.TestHibernate

package com.zaxxer.hikari;

import java.io.FileInputStream;
import java.sql.Connection;
import java.util.Properties;

import org.junit.Assert;
import org.junit.Test;

import com.zaxxer.hikari.hibernate.HikariConnectionProvider;

public class TestHibernate
{
   @Test
   public void testConnectionProvider() throws Exception
   {
      HikariConnectionProvider provider = new HikariConnectionProvider();

      Properties props = new Properties();
      props.load(new FileInputStream("src/test/resources/hibernate.properties"));

      provider.configure(props);
      Connection connection = provider.getConnection();
      provider.closeConnection(connection);

      Assert.assertNotNull(provider.unwrap(HikariConnectionProvider.class));
      Assert.assertFalse(provider.supportsAggressiveRelease());
      provider.stop();
   }
}
TOP

Related Classes of com.zaxxer.hikari.TestHibernate

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.