File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
java/org/tron/core/config/args Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,28 @@ public void testCliOverridesStorageConfig() {
319319 Args .clearParam ();
320320 }
321321
322+ /**
323+ * Verify that event.subscribe.enable = false from config is read correctly.
324+ */
325+ @ Test
326+ public void testEventSubscribeFromConfig () {
327+ Args .setParam (new String [] {}, TestConstants .TEST_CONF );
328+ Assert .assertFalse (Args .getInstance ().isEventSubscribe ());
329+ Args .clearParam ();
330+ }
331+
332+ /**
333+ * Verify that CLI --es overrides event.subscribe.enable from config.
334+ * config-test.conf defines: event.subscribe.enable = false,
335+ * passing --es explicitly sets eventSubscribe = true, overriding config.
336+ */
337+ @ Test
338+ public void testCliEsOverridesConfig () {
339+ Args .setParam (new String [] {"--es" }, TestConstants .TEST_CONF );
340+ Assert .assertTrue (Args .getInstance ().isEventSubscribe ());
341+ Args .clearParam ();
342+ }
343+
322344 /**
323345 * Verify that config file storage values are applied when no CLI override is present.
324346 *
Original file line number Diff line number Diff line change @@ -382,4 +382,8 @@ rate.limiter.http = [
382382]
383383
384384node.dynamicConfig.enable = true
385+
386+ event.subscribe = {
387+ enable = false
388+ }
385389node.dynamicConfig.checkInterval = 0
You can’t perform that action at this time.
0 commit comments