Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Commit af52e84

Browse files
CopilotCybotTM
andcommitted
Fix test compatibility with ActiveMQ 5.19.1 blob URL validation
Co-authored-by: CybotTM <[email protected]>
1 parent ddf95ce commit af52e84

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/java/org/netresearch/amqblobspring/BlobControllerTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public class BlobControllerTest {
4747
@Value("nio://localhost:${jmsPort}")
4848
private String amqUrl;
4949

50+
@Value("${server.port}")
51+
private int serverPort;
52+
5053
@Value("${java.io.tmpdir}")
5154
private Path testPath;
5255

@@ -58,7 +61,9 @@ public class BlobControllerTest {
5861

5962
@Before
6063
public void setUp() throws Exception {
61-
connection = new ActiveMQConnectionFactory(amqUrl).createConnection();
64+
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(amqUrl);
65+
factory.getBlobTransferPolicy().setUploadUrl("http://localhost:" + serverPort);
66+
connection = factory.createConnection();
6267
connection.start();
6368
session = (ActiveMQSession) connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
6469
}

0 commit comments

Comments
 (0)