syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject syncope git commit: fix for building with java 7
Date Fri, 27 May 2016 20:50:53 GMT
Repository: syncope
Updated Branches:
  refs/heads/master fa5e27ff3 -> 3479e5fec


fix for building with java 7


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3479e5fe
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3479e5fe
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3479e5fe

Branch: refs/heads/master
Commit: 3479e5fecc4a3c91009a862f679be146a6852833
Parents: fa5e27f
Author: fmartelli <fabio.martelli@gmail.com>
Authored: Fri May 27 22:50:37 2016 +0200
Committer: fmartelli <fabio.martelli@gmail.com>
Committed: Fri May 27 22:50:37 2016 +0200

----------------------------------------------------------------------
 .../policies/PolicyRuleWizardBuilder.java       | 13 ++++++++--
 .../syncope/fit/console/PoliciesITCase.java     |  4 +--
 .../syncope/fit/console/TopologyITCase.java     | 26 ++++++++++++++++++++
 3 files changed, 39 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/3479e5fe/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleWizardBuilder.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleWizardBuilder.java
b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleWizardBuilder.java
index 6854cf1..6d3950f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleWizardBuilder.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/policies/PolicyRuleWizardBuilder.java
@@ -20,6 +20,8 @@ package org.apache.syncope.client.console.policies;
 
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.Predicate;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
@@ -136,12 +138,19 @@ public class PolicyRuleWizardBuilder
                 }
             });
 
+            final List<String> choices;
+
             if (type == PolicyType.ACCOUNT) {
-                conf.setChoices(new ArrayList<>(SyncopeConsoleSession.get().getPlatformInfo().getAccountRules()));
+                choices = new ArrayList<>(SyncopeConsoleSession.get().getPlatformInfo().getAccountRules());
             } else if (type == PolicyType.PASSWORD) {
-                conf.setChoices(new ArrayList<>(SyncopeConsoleSession.get().getPlatformInfo().getPasswordRules()));
+                choices = new ArrayList<>(SyncopeConsoleSession.get().getPlatformInfo().getPasswordRules());
+            } else {
+                choices = new ArrayList<>();
             }
 
+            Collections.<String>sort(choices);
+            conf.setChoices(choices);
+            
             conf.addRequiredLabel();
             add(conf);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/3479e5fe/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
index acbe454..4b02a00 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
@@ -447,7 +447,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
         FormTester formTester = wicketTester.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:3:"
                 + "outer:form:content:container:content:wizard:form");
         formTester.setValue("view:name:textField", "myrule");
-        formTester.setValue("view:configuration:dropDownChoiceField", "1");
+        formTester.setValue("view:configuration:dropDownChoiceField", "0");
         formTester.submit("buttons:next");
 
         wicketTester.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:"
@@ -541,7 +541,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
         FormTester formTester = wicketTester.newFormTester("body:content:tabbedPanel:panel:outerObjectsRepeater:3:"
                 + "outer:form:content:container:content:wizard:form");
         formTester.setValue("view:name:textField", "myrule");
-        formTester.setValue("view:configuration:dropDownChoiceField", "1");
+        formTester.setValue("view:configuration:dropDownChoiceField", "0");
         formTester.submit("buttons:next");
 
         wicketTester.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:3:outer:form:content:"

http://git-wip-us.apache.org/repos/asf/syncope/blob/3479e5fe/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
index d4a5b9c..ce344c9 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
@@ -20,6 +20,7 @@ package org.apache.syncope.fit.console;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 
 import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
 import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
@@ -271,6 +272,31 @@ public class TopologyITCase extends AbstractConsoleITCase {
                 "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:title",
                 "Executions of task &#039;TestDB Task&#039;");
 
+        int iteration = 0;
+        try {
+            wicketTester.assertComponent(
+                    "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:"
+                    + "second:executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
+                    + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelView:viewLink",
+                    AjaxLink.class);
+        } catch (Exception e) {
+            if (iteration < 10) {
+                try {
+                    // requires a short delay
+                    Thread.sleep(1000);
+                } catch (Exception ignore) {
+                }
+                
+                wicketTester.clickLink(
+                        "body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:second:"
+                        + "executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
+                        + "tablePanel:groupForm:checkgroup:dataTable:topToolbars:toolbars:1:headers:24:header:label:"
+                        + "panelReload:reloadLink");
+                iteration++;
+            } else {
+                fail();
+            }
+        }
         wicketTester.clickLink("body:toggle:outerObjectsRepeater:2:outer:form:content:tasks:secondLevelContainer:"
                 + "second:executions:firstLevelContainer:first:container:content:searchContainer:resultTable:"
                 + "tablePanel:groupForm:checkgroup:dataTable:body:rows:1:cells:6:cell:panelView:viewLink");


Mime
View raw message