Skip to content

Commit 1bbbe5a

Browse files
committed
fix(test): add defaultReference() fallback in TronErrorTest
TronErrorTest.shutdownBlockTimeInitTest manually builds Config without reference.conf fallback, causing ConfigException.Missing before reaching the shutdown validation logic.
1 parent 2fb5da8 commit 1bbbe5a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

framework/src/test/java/org/tron/core/exception/TronErrorTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ public void shutdownBlockTimeInitTest() {
139139
Map<String, String> params = new HashMap<>();
140140
params.put("node.shutdown.BlockTime", "0");
141141
params.put("storage.db.directory", "database");
142-
Config config = ConfigFactory.defaultOverrides().withFallback(
143-
ConfigFactory.parseMap(params));
142+
Config config = ConfigFactory.defaultOverrides()
143+
.withFallback(ConfigFactory.parseMap(params))
144+
.withFallback(ConfigFactory.defaultReference());
144145
TronError thrown = assertThrows(TronError.class, () -> Args.applyConfigParams(config));
145146
assertEquals(TronError.ErrCode.AUTO_STOP_PARAMS, thrown.getErrCode());
146147
}

0 commit comments

Comments
 (0)