File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
java/org/tron/core/config/args Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,31 @@ public void testCliOverridesStorageConfig() {
319319 Args .clearParam ();
320320 }
321321
322+ /**
323+ * Verify that event.subscribe.enable from config is read correctly.
324+ * config-test.conf defines: event.subscribe.enable = true.
325+ */
326+ @ Test
327+ public void testEventSubscribeFromConfig () {
328+ Args .setParam (new String [] {}, TestConstants .TEST_CONF );
329+ Assert .assertTrue (Args .getInstance ().isEventSubscribe ());
330+ Args .clearParam ();
331+ }
332+
333+ /**
334+ * Verify that CLI --es overrides event.subscribe.enable from config.
335+ * config-test.conf defines: event.subscribe.enable = true,
336+ * but --es is a boolean flag that defaults to false when not passed,
337+ * so passing --es explicitly sets eventSubscribe = true (same here).
338+ * The key point is that CLI assignment takes priority over config.
339+ */
340+ @ Test
341+ public void testCliEsOverridesConfig () {
342+ Args .setParam (new String [] {"--es" }, TestConstants .TEST_CONF );
343+ Assert .assertTrue (Args .getInstance ().isEventSubscribe ());
344+ Args .clearParam ();
345+ }
346+
322347 /**
323348 * Verify that config file storage values are applied when no CLI override is present.
324349 *
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 = true
388+ }
385389node.dynamicConfig.checkInterval = 0
You can’t perform that action at this time.
0 commit comments