hudi-agent commented on code in PR #18721:
URL: https://github.com/apache/hudi/pull/18721#discussion_r3831914595
##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/config/TestHoodieWriteConfig.java:
##########
@@ -985,4 +993,34 @@ public void
testUpdatesStrategyNotOverriddenWhenExplicitlySet() {
.build();
assertEquals(customStrategy,
writeConfig.getClusteringUpdatesStrategyClass());
}
+
+ @Test
+ public void testWarnsWhenEventTimeFieldSetWithoutWatermarkTracking() {
+ Properties props = new Properties();
+ props.setProperty(HoodiePayloadConfig.EVENT_TIME_FIELD.key(), "ts");
+ List<LogEvent> captured = new ArrayList<>();
+ AbstractAppender appender = new AbstractAppender(
+ "CaptureAppender", null, null, true, Property.EMPTY_ARRAY) {
+ @Override
+ public void append(LogEvent event) {
+ captured.add(event.toImmutable());
+ }
+ };
+ appender.start();
+ Logger logger = (Logger) LogManager.getLogger(HoodieWriteConfig.class);
+ logger.addAppender(appender);
+ try {
+
HoodieWriteConfig.newBuilder().withPath("/tmp").withProperties(props).build();
+ } finally {
+ logger.removeAppender(appender);
Review Comment:
🤖 nit: `foundHint` doesn't quite match what's being checked — this is a
WARN-level log event, not a hint. Something like `warnLogged` or `warningFound`
would map more directly to the assertion below.
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]