kieker-monitoring / kieker

Kieker's main repository
Apache License 2.0
70 stars 41 forks source link

[KIEKER-135] [KIEK-24] FIXME: Missing implementation of TestConfigurationFactoryMethods.testCreationSingletonConfigurationVariants #1719

Closed rju closed 4 days ago

rju commented 1 week ago

JIRA Issue: [KIEKER-135] [KIEK-24] FIXME: Missing implementation of TestConfigurationFactoryMethods.testCreationSingletonConfigurationVariants Original Reporter: Marius Löwe


TestConfigurationFactoryMethods.testCreationSingletonConfigurationVariants():

/**
 * Tests {link Configuration#createSingletonConfiguration()}.
 * 
 * FIXME: "Missing test: Should test combinations of JVM-Params, Filenames, etc. How to do that?
 *      See ticket https://kieker-monitoring.atlassian.net/ticket/130
 */
public void testCreationSingletonConfigurationVariants() {
}
rju commented 6 days ago

author Jan Waller -- Mon, 10 Oct 2011 13:11:37 +0200

Included in r2100/kieker

Only missing part is a file named META-INF/kieker.monitoring.properties. How to include this in all checks after the first and not in the first one? Java copy? or WontFix?

/*
 * how to do this check? copy file to correct location?
 * { // NOCS (adding properties file in default location)
 * final Configuration configuration = Configuration.createSingletonConfiguration();
 * Assert.assertEquals("KIEKER-SINGLETON-PROPERTIES-FILE-DEFAULT", configuration.getStringProperty(Configuration.CONTROLLER_NAME));
 * }
 */
rju commented 6 days ago

author Jan Waller -- Tue, 11 Oct 2011 16:57:26 +0200

a simple copy doesn't seem to work

       /*
         * { // NOCS (adding properties file in default location)
         * final String fn = "build/tests/" + Configuration.CUSTOM_PROPERTIES_LOCATION_CLASSPATH;
         * try {
         * final PrintWriter pw = new PrintWriter(new FileOutputStream(fn, false));
         * pw.println(Configuration.CONTROLLER_NAME + "=KIEKER-SINGLETON-PROPERTIES-FILE-DEFAULT");
         * pw.close();
         * } catch (final FileNotFoundException e) {
         * Assert.fail("Failed to create file " + fn);
         * }
         * final Configuration configuration = Configuration.createSingletonConfiguration();
         * Assert.assertEquals("KIEKER-SINGLETON-PROPERTIES-FILE-DEFAULT", configuration.getStringProperty(Configuration.CONTROLLER_NAME));
         * }
         */

There is no easy way to check this!

Fixed (with this little Exception)