[
https://issues.apache.org/jira/browse/KARAF-5846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16551689#comment-16551689
]
ASF GitHub Bot commented on KARAF-5846:
---------------------------------------
jbonofre closed pull request #576: [KARAF-5846] Add a test on configuration in
order to identify potential racing condition
URL: https://github.com/apache/karaf/pull/576
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/itests/test/src/test/java/org/apache/karaf/itests/ConfigManagedServiceFactoryTest.java
b/itests/test/src/test/java/org/apache/karaf/itests/ConfigManagedServiceFactoryTest.java
index afeeaa2bbe..1366cce319 100644
---
a/itests/test/src/test/java/org/apache/karaf/itests/ConfigManagedServiceFactoryTest.java
+++
b/itests/test/src/test/java/org/apache/karaf/itests/ConfigManagedServiceFactoryTest.java
@@ -17,6 +17,7 @@
package org.apache.karaf.itests;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile;
import java.io.IOException;
@@ -56,7 +57,7 @@
public void updateProperties() throws IOException,
InvalidSyntaxException {
checkInitialValuesFromFelixConfigAdmin();
checkEditByFactoryPid();
- CheckEditByArbitraryAttribute();
+ checkEditByArbitraryAttribute();
}
@Test
@@ -71,6 +72,7 @@ public void createNewFactoryConfig() throws Exception {
private void checkInitialValuesFromFelixConfigAdmin() throws
IOException,
InvalidSyntaxException {
Configuration config = readConfig();
+ assertNotNull("The configuration is null", config);
assertEquals("data1", config.getProperties().get("test1"));
assertEquals("data2", config.getProperties().get("test2"));
}
@@ -85,7 +87,7 @@ private void checkEditByFactoryPid() throws IOException,
assertEquals("data2", config.getProperties().get("test2"));
}
- private void CheckEditByArbitraryAttribute() throws IOException,
+ private void checkEditByArbitraryAttribute() throws IOException,
InvalidSyntaxException {
executeCommand("config:edit '(test2=data2)'\n"
+ "config:property-set test1 data1new2\n" +
"config:update",
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> ConfigManagedServiceFactoryTest.updateProperties is flacky
> ----------------------------------------------------------
>
> Key: KARAF-5846
> URL: https://issues.apache.org/jira/browse/KARAF-5846
> Project: Karaf
> Issue Type: Test
> Components: karaf-test
> Reporter: Jean-Baptiste Onofré
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 4.2.1
>
>
> {{ConfigManagedServiceFactoryTest.updateProperties}} itest randomly fails on
> Jenkins with the following reason:
> {code}
> org.junit.ComparisonFailure: expected:<data1[]> but was:<data1[new]>
> at
> org.apache.karaf.itests.ConfigManagedServiceFactoryTest.checkInitialValuesFromFelixConfigAdmin(ConfigManagedServiceFactoryTest.java:74)
> at
> org.apache.karaf.itests.ConfigManagedServiceFactoryTest.updateProperties(ConfigManagedServiceFactoryTest.java:57)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)