ChengbingLiu commented on PR #5246: URL: https://github.com/apache/hadoop/pull/5246#issuecomment-1358874741
Here is why I added the reset-`lastLogTimestampMs` logic and slightly tweaked the test case: Each test method in `TestFSEditLogLoader` is executed twice (due to the `@Parameterized` annotation of the class). Since I change the `LogThrottlingHelper` to a static field, other test method execution can have two effects: 1. set the `lastLogTimestampMs` field to a current time; 2. create `LoggingAction`s with suppressed logs. This will break the previous way of testing log throttling, which uses a faked timer. Therefore this patch: 1. resets `lastLogTimestampMs` if the `currentTimeMs` is smaller (can only happen in test cases) 2. clears previous logs by a `loadFSEdits` call before the original test cases These may not be the best solution. Please take a look @xkrogen . Thanks. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
