Copilot commented on code in PR #8151:
URL: https://github.com/apache/incubator-seata/pull/8151#discussion_r3556716420
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -124,93 +127,93 @@ void testDiffDefaultValue() {
}
@Test
- void testGetConfigWithTimeout() {
+ void testGetConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.key", "default-value", 1000);
Assertions.assertNotNull(value);
}
@Test
- void testGetIntWithTimeout() {
+ void testGetIntWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
int value = fileConfig.getInt("test.int.key", 100, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetBooleanWithTimeout() {
+ void testGetBooleanWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean value = fileConfig.getBoolean("test.boolean.key", true, 1000);
- Assertions.assertTrue(value || !value);
+ assertTrue(value || !value);
Review Comment:
This assertion is tautological (always true) and doesn't validate behavior.
Since the key isn't defined in test resources, the API should return the
provided default (true) for this call, so assert that directly.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -124,93 +127,93 @@ void testDiffDefaultValue() {
}
@Test
- void testGetConfigWithTimeout() {
+ void testGetConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.key", "default-value", 1000);
Assertions.assertNotNull(value);
}
@Test
- void testGetIntWithTimeout() {
+ void testGetIntWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
int value = fileConfig.getInt("test.int.key", 100, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetBooleanWithTimeout() {
+ void testGetBooleanWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean value = fileConfig.getBoolean("test.boolean.key", true, 1000);
- Assertions.assertTrue(value || !value);
+ assertTrue(value || !value);
}
@Test
- void testGetLongWithTimeout() {
+ void testGetLongWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
long value = fileConfig.getLong("test.long.key", 1000L, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetShortWithTimeout() {
+ void testGetShortWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
short value = fileConfig.getShort("test.short.key", (short) 10, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testPutConfig() {
+ void testPutConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true, so this test will pass even if
`putConfig` is broken. Assert the expected outcome (successful operation)
instead.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -124,93 +127,93 @@ void testDiffDefaultValue() {
}
@Test
- void testGetConfigWithTimeout() {
+ void testGetConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.key", "default-value", 1000);
Assertions.assertNotNull(value);
}
@Test
- void testGetIntWithTimeout() {
+ void testGetIntWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
int value = fileConfig.getInt("test.int.key", 100, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetBooleanWithTimeout() {
+ void testGetBooleanWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean value = fileConfig.getBoolean("test.boolean.key", true, 1000);
- Assertions.assertTrue(value || !value);
+ assertTrue(value || !value);
}
@Test
- void testGetLongWithTimeout() {
+ void testGetLongWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
long value = fileConfig.getLong("test.long.key", 1000L, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetShortWithTimeout() {
+ void testGetShortWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
short value = fileConfig.getShort("test.short.key", (short) 10, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testPutConfig() {
+ void testPutConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigWithTimeout() {
+ void testPutConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value",
1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigIfAbsent() {
+ void testPutConfigIfAbsent() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfigIfAbsent("test.absent.key",
"test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true; this test should assert an expected
result to be meaningful.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -124,93 +127,93 @@ void testDiffDefaultValue() {
}
@Test
- void testGetConfigWithTimeout() {
+ void testGetConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.key", "default-value", 1000);
Assertions.assertNotNull(value);
}
@Test
- void testGetIntWithTimeout() {
+ void testGetIntWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
int value = fileConfig.getInt("test.int.key", 100, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetBooleanWithTimeout() {
+ void testGetBooleanWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean value = fileConfig.getBoolean("test.boolean.key", true, 1000);
- Assertions.assertTrue(value || !value);
+ assertTrue(value || !value);
}
@Test
- void testGetLongWithTimeout() {
+ void testGetLongWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
long value = fileConfig.getLong("test.long.key", 1000L, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetShortWithTimeout() {
+ void testGetShortWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
short value = fileConfig.getShort("test.short.key", (short) 10, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testPutConfig() {
+ void testPutConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigWithTimeout() {
+ void testPutConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value",
1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigIfAbsent() {
+ void testPutConfigIfAbsent() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfigIfAbsent("test.absent.key",
"test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigIfAbsentWithTimeout() {
+ void testPutConfigIfAbsentWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfigIfAbsent("test.absent.key",
"test-value", 1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true; this assertion doesn't validate
`putConfigIfAbsent` behavior.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -435,40 +438,71 @@ void testMultipleConfigOperations() {
}
@Test
- void testPutAndGetConfig() {
+ void testPutAndGetConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean putResult = fileConfig.putConfig("test.put.get", "put-value");
- Assertions.assertTrue(putResult || !putResult);
+ assertTrue(putResult || !putResult);
Review Comment:
`putResult || !putResult` is always true, so the test doesn't validate
behavior. Assert the expected successful outcome instead.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -124,93 +127,93 @@ void testDiffDefaultValue() {
}
@Test
- void testGetConfigWithTimeout() {
+ void testGetConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.key", "default-value", 1000);
Assertions.assertNotNull(value);
}
@Test
- void testGetIntWithTimeout() {
+ void testGetIntWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
int value = fileConfig.getInt("test.int.key", 100, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetBooleanWithTimeout() {
+ void testGetBooleanWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean value = fileConfig.getBoolean("test.boolean.key", true, 1000);
- Assertions.assertTrue(value || !value);
+ assertTrue(value || !value);
}
@Test
- void testGetLongWithTimeout() {
+ void testGetLongWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
long value = fileConfig.getLong("test.long.key", 1000L, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetShortWithTimeout() {
+ void testGetShortWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
short value = fileConfig.getShort("test.short.key", (short) 10, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testPutConfig() {
+ void testPutConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigWithTimeout() {
+ void testPutConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value",
1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true, so this test doesn't verify anything.
Assert the expected outcome instead.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -124,93 +127,93 @@ void testDiffDefaultValue() {
}
@Test
- void testGetConfigWithTimeout() {
+ void testGetConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.key", "default-value", 1000);
Assertions.assertNotNull(value);
}
@Test
- void testGetIntWithTimeout() {
+ void testGetIntWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
int value = fileConfig.getInt("test.int.key", 100, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetBooleanWithTimeout() {
+ void testGetBooleanWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean value = fileConfig.getBoolean("test.boolean.key", true, 1000);
- Assertions.assertTrue(value || !value);
+ assertTrue(value || !value);
}
@Test
- void testGetLongWithTimeout() {
+ void testGetLongWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
long value = fileConfig.getLong("test.long.key", 1000L, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetShortWithTimeout() {
+ void testGetShortWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
short value = fileConfig.getShort("test.short.key", (short) 10, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testPutConfig() {
+ void testPutConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigWithTimeout() {
+ void testPutConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value",
1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigIfAbsent() {
+ void testPutConfigIfAbsent() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfigIfAbsent("test.absent.key",
"test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigIfAbsentWithTimeout() {
+ void testPutConfigIfAbsentWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfigIfAbsent("test.absent.key",
"test-value", 1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testRemoveConfig() {
+ void testRemoveConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
fileConfig.putConfig("test.remove.key", "test-value");
boolean result = fileConfig.removeConfig("test.remove.key");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testRemoveConfigWithTimeout() {
+ void testRemoveConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
fileConfig.putConfig("test.remove.key", "test-value");
boolean result = fileConfig.removeConfig("test.remove.key", 1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true and won't catch regressions in
`removeConfig(...)` behavior. Assert the expected outcome instead.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -124,93 +127,93 @@ void testDiffDefaultValue() {
}
@Test
- void testGetConfigWithTimeout() {
+ void testGetConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.key", "default-value", 1000);
Assertions.assertNotNull(value);
}
@Test
- void testGetIntWithTimeout() {
+ void testGetIntWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
int value = fileConfig.getInt("test.int.key", 100, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetBooleanWithTimeout() {
+ void testGetBooleanWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean value = fileConfig.getBoolean("test.boolean.key", true, 1000);
- Assertions.assertTrue(value || !value);
+ assertTrue(value || !value);
}
@Test
- void testGetLongWithTimeout() {
+ void testGetLongWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
long value = fileConfig.getLong("test.long.key", 1000L, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testGetShortWithTimeout() {
+ void testGetShortWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
short value = fileConfig.getShort("test.short.key", (short) 10, 1000);
- Assertions.assertTrue(value >= 0);
+ assertTrue(value >= 0);
}
@Test
- void testPutConfig() {
+ void testPutConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigWithTimeout() {
+ void testPutConfigWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfig("test.put.key", "test-value",
1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigIfAbsent() {
+ void testPutConfigIfAbsent() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfigIfAbsent("test.absent.key",
"test-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testPutConfigIfAbsentWithTimeout() {
+ void testPutConfigIfAbsentWithTimeout() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean result = fileConfig.putConfigIfAbsent("test.absent.key",
"test-value", 1000);
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testRemoveConfig() {
+ void testRemoveConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
fileConfig.putConfig("test.remove.key", "test-value");
boolean result = fileConfig.removeConfig("test.remove.key");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true; assert the expected success result so
failures are detected.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -435,40 +438,71 @@ void testMultipleConfigOperations() {
}
@Test
- void testPutAndGetConfig() {
+ void testPutAndGetConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean putResult = fileConfig.putConfig("test.put.get", "put-value");
- Assertions.assertTrue(putResult || !putResult);
+ assertTrue(putResult || !putResult);
}
@Test
- void testPutConfigIfAbsentWhenKeyExists() {
+ void testPutConfigIfAbsentWhenKeyExists() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
System.setProperty("test.put.if.absent", "existing-value");
boolean result = fileConfig.putConfigIfAbsent("test.put.if.absent",
"new-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testRemoveExistingConfig() {
+ void testRemoveExistingConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
System.setProperty("test.remove.existing", "value");
boolean result = fileConfig.removeConfig("test.remove.existing");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testGetConfigFromSystemProperty() {
+ void testGetConfigFromSystemProperty() throws Exception {
System.setProperty("test.sys.prop", "sys-prop-value");
Configuration fileConfig = ConfigurationFactory.getInstance();
String value = fileConfig.getConfig("test.sys.prop");
Assertions.assertEquals("sys-prop-value", value);
}
@Test
- void testGetConfigFromEnvironmentVariable() {
+ void testGetConfigFromEnvironmentVariable() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
String path = fileConfig.getConfigFromSys("PATH");
Assertions.assertNotNull(path);
}
+
+ @Test
+ void shouldDelegateFileBackedReadsThroughConfigurationFactory() {
+ Configuration fileConfig = ConfigurationFactory.getInstance();
+
+ Assertions.assertEquals("127.0.0.1:8091",
fileConfig.getConfig("service.default.grouplist"));
+ assertFalse(fileConfig.getBoolean("service.disableGlobalTransaction"));
+ }
Review Comment:
This test assumes file-backed values, but other tests in this class mutate
the same `service.disableGlobalTransaction` System property and JUnit does not
guarantee method order. Clear/restore relevant System properties (and reload)
inside the test to make it order-independent.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -435,40 +438,71 @@ void testMultipleConfigOperations() {
}
@Test
- void testPutAndGetConfig() {
+ void testPutAndGetConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean putResult = fileConfig.putConfig("test.put.get", "put-value");
- Assertions.assertTrue(putResult || !putResult);
+ assertTrue(putResult || !putResult);
}
@Test
- void testPutConfigIfAbsentWhenKeyExists() {
+ void testPutConfigIfAbsentWhenKeyExists() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
System.setProperty("test.put.if.absent", "existing-value");
boolean result = fileConfig.putConfigIfAbsent("test.put.if.absent",
"new-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true; this doesn't validate
`putConfigIfAbsent` behavior.
##########
config/seata-config-core/src/test/java/org/apache/seata/config/FileConfigurationTest.java:
##########
@@ -435,40 +438,71 @@ void testMultipleConfigOperations() {
}
@Test
- void testPutAndGetConfig() {
+ void testPutAndGetConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
boolean putResult = fileConfig.putConfig("test.put.get", "put-value");
- Assertions.assertTrue(putResult || !putResult);
+ assertTrue(putResult || !putResult);
}
@Test
- void testPutConfigIfAbsentWhenKeyExists() {
+ void testPutConfigIfAbsentWhenKeyExists() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
System.setProperty("test.put.if.absent", "existing-value");
boolean result = fileConfig.putConfigIfAbsent("test.put.if.absent",
"new-value");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
}
@Test
- void testRemoveExistingConfig() {
+ void testRemoveExistingConfig() throws Exception {
Configuration fileConfig = ConfigurationFactory.getInstance();
System.setProperty("test.remove.existing", "value");
boolean result = fileConfig.removeConfig("test.remove.existing");
- Assertions.assertTrue(result || !result);
+ assertTrue(result || !result);
Review Comment:
`result || !result` is always true; assert the expected outcome so
regressions are caught.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]