[AMQ-8511] Minor fix for amqp unit tests to help w/ CI build consistency (#780)

This commit is contained in:
Matt Pavlovich 2022-02-24 08:45:25 -06:00 committed by GitHub
parent 4715a01877
commit e522feaad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -100,7 +100,6 @@ public class AmqpTestSupport {
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
LOG.info("========== start " + getTestName() + " =========="); LOG.info("========== start " + getTestName() + " ==========");
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES", "java.util");
exceptions.clear(); exceptions.clear();
startBroker(); startBroker();
@ -356,7 +355,10 @@ public class AmqpTestSupport {
} }
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(openwireURI); ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(openwireURI);
List<String> trustedPackages = new ArrayList<>();
trustedPackages.addAll(factory.getTrustedPackages());
trustedPackages.add("java.util");
factory.setTrustedPackages(trustedPackages);
return factory.createConnection(); return factory.createConnection();
} }
@ -466,4 +468,4 @@ public class AmqpTestSupport {
.newProxyInstance(queueViewMBeanName, TopicViewMBean.class, true); .newProxyInstance(queueViewMBeanName, TopicViewMBean.class, true);
return proxy; return proxy;
} }
} }