}
failOnError();
}
private void checkSessions(String where, SessionFactory sessionFactory1, Integer[] expected) {
SessionFactoryImpl sessionFactoryImpl = (SessionFactoryImpl)sessionFactory1;
List<Integer> connectionCounts = sessionFactoryImpl.getConnectionPoolSessionCounts();
if (expected.length != connectionCounts.size()) {
error(where + " wrong number of connections in pool\n"
+ "Expected: " + Arrays.toString(expected)
+ " Actual: " + connectionCounts);
return;