justinmclean opened a new issue, #8206:
URL: https://github.com/apache/gravitino/issues/8206
### What would you like to be improved?
In core/src/main/java/org/apache/gravitino/listener/AsyncQueueListener.java,
a NPE can occur.
Here's a unit test to show the issue:
```
public class TestAsyncQueueListener {
private static class NoopListener implements EventListenerPlugin {
@Override
public void init(Map<String, String> properties) {}
@Override
public void start() {}
@Override
public void stop() {}
}
@Test
public void testDropEventLoggingDoesNotThrow() {
AsyncQueueListener listener =
new AsyncQueueListener(Collections.singletonList(new
NoopListener()), "test", 1, 1);
PreEvent event = new ListMetalakePreEvent("user");
listener.onPreEvent(event); // fill the queue
Assertions.assertDoesNotThrow(() -> listener.onPreEvent(event));
}
}
```
### How should we improve?
Fix by initialising lastRecordDropEventTime
--
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]