@@ -48,6 +48,7 @@ public class BmqBrokerContainer implements BmqBroker {
48
48
private static final Logger logger =
49
49
LoggerFactory .getLogger (MethodHandles .lookup ().lookupClass ());
50
50
private static final String CONTAINER_TMP_LOGS = "/tmp/logs" ;
51
+ private static final String CONTAINER_CORES = "/tmp/cores" ;
51
52
private static final String IMAGE_NAME = "bmq-broker-java-it" ;
52
53
private static final String OUTPUT_FILENAME = "output.log" ;
53
54
@@ -86,9 +87,11 @@ public static BmqBrokerContainer createContainer(int port) throws IOException {
86
87
logger .info ("Create '{}' container" , name );
87
88
88
89
final Path tmpDir = makeTempDir (name );
89
- final Path logsPath = tmpDir .resolve ("logs" );
90
+ final Path hostLogsPath = tmpDir .resolve ("logs" );
91
+ final Path hostCoresPath = Paths .get ("/tmp/cores" );
90
92
91
- logger .info ("Use '{}' directory for broker logs" , logsPath );
93
+ logger .info ("Use '{}' directory for broker logs" , hostLogsPath );
94
+ logger .info ("Use '{}' directory for broker cores" , hostCoresPath );
92
95
93
96
final PortBinding portBinding =
94
97
PortBinding .parse (opts .brokerUri ().getPort () + ":" + BROKER_DEFAULT_PORT );
@@ -97,7 +100,8 @@ public static BmqBrokerContainer createContainer(int port) throws IOException {
97
100
final HostConfig hostConfig =
98
101
new HostConfig ()
99
102
.withPortBindings (portBinding )
100
- .withBinds (Bind .parse (logsPath + ":" + CONTAINER_TMP_LOGS ));
103
+ .withBinds (Bind .parse (hostlogsPath + ":" + CONTAINER_TMP_LOGS ))
104
+ .withBinds (Bind .parse (hostCoresPath + ":" + CONTAINER_CORES ));
101
105
102
106
final String id =
103
107
client .createContainerCmd (IMAGE_NAME )
0 commit comments