Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1331#issuecomment-215851189 @jburwell, that is great that we understood each other ;) Your questions is a great one, why are we discussion this, and why testing that. Actually, I do not care much about the writing of test cases to check if something is logged. The point is that there is that âcleanupStagingNfsâ method. If we want to write a nice test to it, we would have to test the happy day flow; that means if the method is creating the âDeleteCommandâ object and then if it call the âexecuteâ method with that object. That is one test case. I see that kind of test as an integration test; meaning, a test if a method is using some other method. Having said that, I see another flow of execution; we might have an exception. So, if an exception occurs, what happens? By the code, today we log the exception and the execution continues. Then we would have to ask ourselves, do we want to enforce that? If someone silences that exception, would we like to catch that? If someone re-throws the exception, using a runtime one; would we like to detect that? At first sight, I think that we should guarantee both executions flows. But, if it becomes a burden, we can let it go.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---