Skip to content

Commit 0b0ccf6

Browse files
committed
explicitly initialize trace provider so it may be shut down properly
Signed-off-by: Antoine Toulme <[email protected]>
1 parent 46a9939 commit 0b0ccf6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fabric-chaincode-shim/src/test/java/org/hyperledger/fabric/shim/impl/InnvocationTaskManagerTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.hyperledger.fabric.protos.peer.ChaincodeShim;
1313
import org.hyperledger.fabric.shim.ChaincodeBase;
1414
import org.hyperledger.fabric.shim.chaincode.EmptyChaincode;
15+
import org.hyperledger.fabric.traces.Traces;
1516
import org.junit.Rule;
1617
import org.junit.contrib.java.lang.system.EnvironmentVariables;
1718
import org.junit.jupiter.api.AfterEach;
@@ -57,6 +58,7 @@ void getManager() throws IOException {
5758
chaincodeBase.validateOptions();
5859

5960
Properties props = chaincodeBase.getChaincodeConfig();
61+
Traces.initialize(props);
6062
Metrics.initialize(props);
6163

6264
final Chaincode.ChaincodeID chaincodeId = Chaincode.ChaincodeID.newBuilder().setName("chaincodeIdNumber12345").build();
@@ -223,6 +225,7 @@ void shutdown() throws IOException {
223225
chaincodeBase.validateOptions();
224226

225227
Properties props = chaincodeBase.getChaincodeConfig();
228+
Traces.initialize(props);
226229
Metrics.initialize(props);
227230

228231
final ManagedChannelBuilder<?> managedChannelBuilder = chaincodeBase.newChannelBuilder();

0 commit comments

Comments
 (0)