You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/11/10 20:28:59 UTC
svn commit: r1200489 -
/activemq/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledSessionExhaustionTest.java
Author: tabish
Date: Thu Nov 10 19:28:59 2011
New Revision: 1200489
URL: http://svn.apache.org/viewvc?rev=1200489&view=rev
Log:
Add missing license header and a tearDown method to ensure the created BrokerService gets stopped.
Modified:
activemq/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledSessionExhaustionTest.java
Modified: activemq/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledSessionExhaustionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledSessionExhaustionTest.java?rev=1200489&r1=1200488&r2=1200489&view=diff
==============================================================================
--- activemq/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledSessionExhaustionTest.java (original)
+++ activemq/trunk/activemq-pool/src/test/java/org/apache/activemq/pool/PooledSessionExhaustionTest.java Thu Nov 10 19:28:59 2011
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.activemq.pool;
import org.apache.activemq.*;
@@ -22,6 +38,7 @@ public class PooledSessionExhaustionTest
private String connectionUri;
private int numReceived = 0;
+ @Override
protected void setUp() throws Exception {
broker = new BrokerService();
broker.setPersistent(false);
@@ -34,6 +51,13 @@ public class PooledSessionExhaustionTest
pooledFactory.setBlockIfSessionPoolIsFull(false);
}
+ @Override
+ protected void tearDown() throws Exception {
+ broker.stop();
+ broker.waitUntilStopped();
+ broker = null;
+ }
+
public void sendMessages(ConnectionFactory connectionFactory) throws Exception {
for (int i = 0; i < NUM_MESSAGES; i++) {
Connection connection = connectionFactory.createConnection();