Tal Nisan has uploaded a new change for review. Change subject: core: Make ConfigValuesTest more informative ......................................................................
core: Make ConfigValuesTest more informative Currently the test stops after finding one missing values, it makes no sense to keep runing the test over and over until you fix all missing values issues so the missing values will be aggregated in a list. Aside for that, the logging of the missing value is swallowed between all the other tests and the test summary does not show which key was missing so the missing values are also added to the test result now Change-Id: Icb921f082350d19006c7b977c2697009bbc2a10d Signed-off-by: Tal Nisan <[email protected]> --- M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/queries/ConfigValuesTest.java 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/51/36551/1 diff --git a/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/queries/ConfigValuesTest.java b/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/queries/ConfigValuesTest.java index 0610980..00020ec 100644 --- a/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/queries/ConfigValuesTest.java +++ b/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/queries/ConfigValuesTest.java @@ -2,7 +2,9 @@ import static org.junit.Assert.assertFalse; +import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Set; import org.junit.Test; @@ -25,15 +27,17 @@ @Test public void findMissingEnumNames() { // Find missing ConfigurationValues enum names in ConfigValues enum - boolean missingKey = false; + boolean foundMissingKeys = false; + List<ConfigurationValues> missingKeys = new ArrayList<ConfigurationValues>(); for (ConfigurationValues configValue : ConfigurationValues.values()) { if (!configValuesEnumNames.contains(configValue.toString())) { log.error("Found missing key: {}", configValue); - missingKey = true; + foundMissingKeys = true; + missingKeys.add(configValue); break; } } - assertFalse("Found missing key: ", missingKey); + assertFalse("Found missing keys: " + missingKeys, foundMissingKeys); } } -- To view, visit http://gerrit.ovirt.org/36551 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb921f082350d19006c7b977c2697009bbc2a10d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tal Nisan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
