Skip to content

Commit 9dc55fd

Browse files
committed
Fix ActiveMQMultiContextTest for trustAllPackages
1 parent 1759080 commit 9dc55fd

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

spring-integration-jms/src/test/java/org/springframework/integration/jms/ActiveMQMultiContextTests.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.integration.jms;
1818

19-
import javax.jms.ConnectionFactory;
20-
2119
import org.apache.activemq.ActiveMQConnectionFactory;
2220
import org.apache.activemq.transport.vm.VMTransport;
2321
import org.junit.AfterClass;
@@ -29,19 +27,23 @@
2927
* Keeps an ActiveMQ {@link VMTransport} open for the duration of
3028
* all tests (avoids cycling the transport each time the last
3129
* connection is closed).
30+
*
3231
* @author Gary Russell
32+
*
3333
* @since 3.0
3434
*
3535
*/
3636
public abstract class ActiveMQMultiContextTests {
3737

38-
protected static final ConnectionFactory amqFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
38+
protected static final ActiveMQConnectionFactory amqFactory =
39+
new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
3940

40-
protected static final CachingConnectionFactory connectionFactory = new CachingConnectionFactory(
41-
amqFactory);
41+
protected static final CachingConnectionFactory connectionFactory =
42+
new CachingConnectionFactory(amqFactory);
4243

4344
@BeforeClass
4445
public static void startUp() throws Exception {
46+
amqFactory.setTrustAllPackages(true);
4547
connectionFactory.setCacheConsumers(false);
4648
connectionFactory.createConnection().close();
4749
}

0 commit comments

Comments
 (0)