bigcyy commented on issue #3220: URL: https://github.com/apache/hertzbeat/issues/3220#issuecomment-2814931097
Hi Tom, The `RealTimeAlertCalculator` class has only one public method—the constructor. Essentially, this makes the class a *passive-invocation component*—it registers tasks, consumes queues, starts threads, and performs initialization during construction, while the actual execution logic resides in private methods triggered by external events. If I want to write unit tests for it, I would inevitably need to either modify private methods or use reflection. Do you have any suggestions on how I could approach unit testing for this kind of design? -- 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: notifications-unsubscr...@hertzbeat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org