-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a config to disable all logging appenders #3208
Conversation
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
@UseAgent("disabled_applicationinsights.json") | ||
abstract class JavaUtilLoggingDisabledTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and then can remove all the subclasses (similar to the other disabled tests, no need to run these tests against envs)
abstract class JavaUtilLoggingDisabledTest { | |
@Environment(TOMCAT_8_JAVA_8) | |
class JavaUtilLoggingDisabledTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the purpose of doing subclass is to test all java versions.. this will cover one case?
our repo has this setup everywhere though
i can make the change but i think it needs to be consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the other *DisabledTest
smoke tests, they also only test one case
...ging/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/JavaUtilLoggingTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@WebServlet("/testDisabled") | ||
public class JavaUtilLoggingDisabledServlet extends HttpServlet { | ||
|
||
private static final Logger logger = Logger.getLogger("smoketestapp"); | ||
|
||
protected void doGet(HttpServletRequest request, HttpServletResponse response) { | ||
logger.log(Level.WARNING, "this message will get suppressed."); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need a separate Servlet for these tests, can just hit the same servlet that the normal test does (this is how other *DisabledTest
smoke tests work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i followed the existing setup.. one test per servlet. i think we can clean up later for all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i noticed those are spring boot apps. not servlet. we can chat about it in tomorrow's standup
No description provided.