[
https://issues.apache.org/jira/browse/GEODE-6158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirk Lund reassigned GEODE-6158:
--------------------------------
Assignee: Kirk Lund
> Need a JUnit logging config rule that copies resource to TemporaryFolder and
> feeds it to LoggerContextRule
> ----------------------------------------------------------------------------------------------------------
>
> Key: GEODE-6158
> URL: https://issues.apache.org/jira/browse/GEODE-6158
> Project: Geode
> Issue Type: Wish
> Components: logging, tests
> Reporter: Kirk Lund
> Assignee: Kirk Lund
> Priority: Major
>
> The integration tests that specify a custom log4j2.xml use the following
> pattern. I'd like to create a JUnit rule that does all of this without having
> to set up a @ClassRule and @BeforeClass just to copy a log4j2.xml to a
> TemporaryFolder to feed to LoggerContextRule.
> {noformat}
> @ClassRule
> public static TemporaryFolder temporaryFolder = new TemporaryFolder();
> @Rule
> public LoggerContextRule loggerContextRule = new
> LoggerContextRule(configFilePath);
> @Rule
> public TestName testName = new TestName();
> @BeforeClass
> public static void setUpLogConfigFile() throws Exception {
> URL resource = getResource(CONFIG_FILE_NAME);
> configFilePath = createFileFromResource(resource,
> temporaryFolder.getRoot(), CONFIG_FILE_NAME)
> .getAbsolutePath();
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)