r1232 - in trunk: . src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/auth src/main/java/cc/kune/core/client/errors src/main/java/cc/kune/core/client/init src/main/java/cc/kune/core/client/resources src/main/java/cc/kune/core/client/ui/dialogs src/main/java/cc/kune/core/public src/test/java/org/ourproject/kune src/test/java/org/ourproject/kune/platf/server src/test/java/org/ourproject/kune/platf/server/manager/impl
Author: vjrj_ Date: 2011-02-02 06:37:02 +0100 (Wed, 02 Feb 2011) New Revision: 1232 Modified: trunk/TROUBLESHOOT trunk/src/main/java/cc/kune/core/client/CoreGinModule.java trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessagePanel.java trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java trunk/src/main/java/cc/kune/core/public/ws.css trunk/src/main/java/cc/kune/core/public/ws.html trunk/src/test/java/org/ourproject/kune/FaultyTestSuite.java trunk/src/test/java/org/ourproject/kune/IntegrationTestSuite.java trunk/src/test/java/org/ourproject/kune/ServerTestSuite.java trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerMoreTest.java Log: NEW - # 21: Server Test fixing http://kune.ourproject.org/issues/ticket/21 Some ui fixes Modified: trunk/TROUBLESHOOT =================================================================== --- trunk/TROUBLESHOOT 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/TROUBLESHOOT 2011-02-02 05:37:02 UTC (rev 1232) @@ -40,8 +40,10 @@ (...) Caused by: org.apache.lucene.index.CorruptIndexException: Unknown format version: -7 -The indexes in /var/lib/kune/lucen/kune*/indexes/ are not compatible. For the moment the only workaround we now it's to delete the indexes. +The indexes in /var/lib/kune/lucene/kune*/indexes/ are not compatible. For the moment the only workaround we now it's to delete the indexes. +Sometimes the tests also fails without any error (use the same workaround). + == JUnit == Running all the Kune test from eclipse I get connection pool exceptions like: @@ -81,4 +83,4 @@ Set M2_REPO to eclipse in Preferences > Java > Build Path > Classpath Variable (normally to /home/youruser/.m2/repository/) -=== \ No newline at end of file +=== Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -49,8 +49,6 @@ import cc.kune.core.client.state.StateManager; import cc.kune.core.client.state.StateManagerDefault; import cc.kune.core.client.ui.QTipsHelper; -import cc.kune.core.client.ui.dialogs.MessagePanel; -import cc.kune.core.client.ui.dialogs.MessagePanelView; import cc.kune.core.client.ws.CorePresenter; import cc.kune.core.client.ws.CoreViewImpl; import cc.kune.core.shared.i18n.I18nTranslationService; @@ -114,7 +112,7 @@ bind(UserMessagesPresenter.class).in(Singleton.class); bind(UserMessagesPanel.class).in(Singleton.class); - bind(MessagePanelView.class).to(MessagePanel.class); + // bind(MessagePanelView.class).to(MessagePanel.class); bind(WsArmorImpl.class).in(Singleton.class); bind(WsArmor.class).to(WsArmorImpl.class).in(Singleton.class); Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -33,7 +33,7 @@ public static final String COUNTRY_FIELD = "k-urf-country-f"; public static final String EMAIL_FIELD = "k-urf-email-f"; public static final String LANG_FIELD = "k-urf-lang-f"; - // public static final String LONGNAME_FIELD = "k-urf-long_name-f"; + public static final String LONGNAME_FIELD = "k-urf-long_name-f"; public static final String NICK_FIELD = "k-urf-nick-f"; public static final String NOPERSONALHOMEPAGE_ID = "k-urf-nphp-id"; public static final String PASSWORD_FIELD = "k-urf-password-f"; @@ -43,7 +43,7 @@ public static final String WANTHOMEPAGE_FIELD = "k-urf-wphp-f"; private final TextField<String> emailRegField; - // private final TextField<String> longNameRegField; + private final TextField<String> longNameRegField; private final TextField<String> passwdRegField; private final TextField<String> shortNameRegField; @@ -65,17 +65,17 @@ shortNameRegField.setValidationDelay(1000); add(shortNameRegField); - // longNameRegField = new TextField<String>(); - // longNameRegField.setTabIndex(2); - // longNameRegField.setFieldLabel(i18n.t("Full Name")); - // longNameRegField.setName(LONGNAME_FIELD); - // longNameRegField.setWidth(DEF_FIELD_WIDTH); - // longNameRegField.setAllowBlank(false); - // longNameRegField.setMinLength(3); - // longNameRegField.setMaxLength(50); - // // longNameRegField.setValidationEvent(false); - // longNameRegField.setId(LONGNAME_FIELD); - // add(longNameRegField); + longNameRegField = new TextField<String>(); + longNameRegField.setTabIndex(2); + longNameRegField.setFieldLabel(i18n.t("Full Name")); + longNameRegField.setName(LONGNAME_FIELD); + longNameRegField.setWidth(DEF_FIELD_WIDTH); + longNameRegField.setAllowBlank(false); + longNameRegField.setMinLength(3); + longNameRegField.setMaxLength(50); + // longNameRegField.setValidationEvent(false); + longNameRegField.setId(LONGNAME_FIELD); + add(longNameRegField); passwdRegField = new TextField<String>(); passwdRegField.setTabIndex(3); @@ -83,7 +83,10 @@ passwdRegField.setName(PASSWORD_FIELD); passwdRegField.setPassword(true); passwdRegField.setAllowBlank(false); + passwdRegField.setMinLength(6); passwdRegField.setMaxLength(40); + passwdRegField.getMessages().setMinLengthText(i18n.t(CoreMessages.PASSWD_MUST_BE_BETWEEN_6_AND_40)); + passwdRegField.getMessages().setMaxLengthText(i18n.t(CoreMessages.PASSWD_MUST_BE_BETWEEN_6_AND_40)); passwdRegField.setWidth(DEF_MEDIUM_FIELD_WIDTH); passwdRegField.setValidationDelay(1000); passwdRegField.setId(PASSWORD_FIELD); @@ -107,9 +110,9 @@ return emailRegField.getValue(); } - // public String getLongName() { - // return longNameRegField.getValue(); - // } + public String getLongName() { + return longNameRegField.getValue(); + } public String getRegisterPassword() { return passwdRegField.getValue(); Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -62,10 +62,10 @@ return registerForm.getEmail(); } - // @Override - // public String getLongName() { - // return registerForm.getLongName(); - // } + @Override + public String getLongName() { + return registerForm.getLongName(); + } @Override public String getRegisterPassword() { @@ -104,31 +104,6 @@ } @Override - public void showWelcolmeDialog() { - // final InfoDialog welcomeDialog = new InfoDialog(WELCOME_DIALOG, - // i18n.t("Welcome"), - // i18n.t("Thanks for registering"), - // i18n.t("Now you can participate more actively in this site with other people and groups. " - // + "You can also use your personal space to publish contents. " - // + - // "Your email is not verified, please follow the instructions you will receive by email."), - // i18n.t("Ok"), WELCOME_OK_BUTTON, true, true, 380, 210); - // welcomeDialog.show(); - } - - @Override - public void showWelcolmeDialogNoHomepage() { - // final InfoDialog welcomeDialog = new InfoDialog(WELCOME_DIALOG, - // i18n.t("Welcome"), - // i18n.t("Thanks for registering"), - // i18n.t("Now you can participate more actively in this site with other people and groups. " - // + - // "Your email is not verified, please follow the instructions you will receive by email."), - // i18n.t("Ok"), WELCOME_OK_BUTTON, true, true, 380, 210); - // welcomeDialog.show(); - } - - @Override public void validate() { registerForm.validate(); } Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -27,6 +27,7 @@ import cc.kune.core.client.errors.GroupNameInUseException; import cc.kune.core.client.i18n.I18nUITranslationService; import cc.kune.core.client.logs.Log; +import cc.kune.core.client.notify.msgs.UserNotifyEvent; import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.client.rpcservices.UserServiceAsync; import cc.kune.core.client.state.Session; @@ -133,11 +134,10 @@ final boolean wantHomepage = true; - final String shortName = getView().getShortName(); - final String password = getView().getRegisterPassword(); - final UserDTO user = new UserDTO("", shortName, password, getView().getEmail(), language, country, - timezone, null, true, SubscriptionMode.manual, "blue"); - super.saveAutocompleteLoginData(shortName, password); + final UserDTO user = new UserDTO(getView().getLongName(), getView().getShortName(), + getView().getRegisterPassword(), getView().getEmail(), language, country, timezone, null, true, + SubscriptionMode.manual, "blue"); + super.saveAutocompleteLoginData(getView().getShortName(), getView().getRegisterPassword()); final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() { @Override public void onFailure(final Throwable caught) { @@ -159,11 +159,34 @@ getView().hide(); getView().unMask(); if (wantHomepage) { - getView().showWelcolmeDialog(); + showWelcolmeDialog(); } else { - getView().showWelcolmeDialogNoHomepage(); + showWelcolmeDialogNoHomepage(); } } + + private void showWelcolmeDialog() { + getEventBus().fireEvent( + new UserNotifyEvent( + NotifyLevel.info, + i18n.t("Welcome"), + i18n.t("Thanks for registering. " + + "Now you can participate more actively in this site with other people and groups. " + + "You can also use your personal space to publish contents. " + + "Your email is not verified, please follow the instructions you will receive by email."), + true)); + } + + private void showWelcolmeDialogNoHomepage() { + getEventBus().fireEvent( + new UserNotifyEvent( + NotifyLevel.info, + i18n.t("Welcome"), + i18n.t("Thanks for registering" + + "Now you can participate more actively in this site with other people and groups. " + + "Your email is not verified, please follow the instructions you will receive by email."), + true)); + } }; userServiceProvider.get().createUser(user, wantHomepage, callback); } Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -23,8 +23,7 @@ String getEmail(); - // - // String getLongName(); + String getLongName(); String getRegisterPassword(); @@ -34,10 +33,6 @@ boolean isValid(); - void showWelcolmeDialog(); - - void showWelcolmeDialogNoHomepage(); - void validate(); } Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -27,7 +27,6 @@ import com.extjs.gxt.ui.client.event.Listener; import com.extjs.gxt.ui.client.widget.form.Field; import com.extjs.gxt.ui.client.widget.form.TextField; -import com.google.gwt.user.client.Window; public class SignInForm extends DefaultForm { public static final String NICKOREMAIL_FIELD = "kune-sif-nkf"; @@ -62,7 +61,7 @@ @Override public void handleEvent(final FieldEvent fe) { if (fe.getEvent().getKeyCode() == 13) { - Window.alert("SignInForm"); + // Window.alert("SignInForm"); // presenter.onFormSignIn(); } } Modified: trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -119,7 +119,8 @@ eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.error, i18n.t("This user is already a group member"))); } else { logException(caught, true); - eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.error, i18n.t("Error performing operation"))); + eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.error, + i18n.t("Oops! Something has gone wrong with our servers. Retry later, please."))); GWT.log("Other kind of exception in StateManagerDefault/processErrorException", caught); } } Modified: trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -95,7 +95,9 @@ @Override public void execute() { hideInitialPanels(); - eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.info, "Success", "App Started.", true)); + // eventBus.fireEvent(new + // UserNotifyEvent(NotifyLevel.info, "Success", + // "App Started.", true)); } }); } Modified: trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -30,6 +30,7 @@ public final static String MEMBERS_NOT_PUBLIC = "The members of this group are not public"; public final static String NAME_IN_ALREADY_IN_USE = "This name is already in use. Please try with a different name"; public final static String NAME_IN_USE = "This name in already in use. Please try with a different name"; + public final static String PASSWD_MUST_BE_BETWEEN_6_AND_40 = "The password must be between 6 and 40 characters"; public final static String REGISTER_A_NEW_GROUP_TITLE = "Register a new Group"; public final static String REGISTER_TITLE = "Register"; public final static String REGISTER_TO_CREATE_A_GROUP = "Please, sign in or register to create a group"; Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml 2011-02-02 05:37:02 UTC (rev 1232) @@ -8,7 +8,7 @@ spacing="10"> <k:IconLabel ui:field="title" addStyleNames="k-dialog-title" /> <g:VerticalPanel ui:field="vp" /> - <g:VerticalPanel ui:field="bottomPanel"></g:VerticalPanel> + <g:VerticalPanel ui:field="bottomPanel" width="100%"></g:VerticalPanel> </g:VerticalPanel> </g:SimplePanel> <g:FlowPanel ui:field="btnPanel" addStyleNames="k-dialog-btn-area"> Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessagePanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessagePanel.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessagePanel.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -14,6 +14,7 @@ import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Widget; +import com.google.inject.Inject; public class MessagePanel extends Composite implements MessagePanelView { @@ -32,6 +33,7 @@ @UiField Label title; + @Inject public MessagePanel(final NotifyLevelImages images, final String errorLabelId) { this.images = images; initWidget(uiBinder.createAndBindUi(this)); Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -26,18 +26,19 @@ import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.Label; +import com.google.gwt.user.client.ui.InlineLabel; public class MessageToolbar extends Composite { private final Image errorIcon; - private final Label errorLabel; + private final InlineLabel errorLabel; private final NotifyLevelImages images; private final FlowPanel toolbar; public MessageToolbar(final NotifyLevelImages images, final String errorLabelId) { this.images = images; toolbar = new FlowPanel(); - errorLabel = new Label(""); + errorLabel = new InlineLabel(""); + errorLabel.setWordWrap(true); errorLabel.ensureDebugId(errorLabelId); errorIcon = new Image(); errorIcon.setResource(images.getImage(NotifyLevel.error)); Modified: trunk/src/main/java/cc/kune/core/public/ws.css =================================================================== --- trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-02 05:37:02 UTC (rev 1232) @@ -665,7 +665,6 @@ display: inline; } - .k-message-panel { margin: 5px; display: table-row; @@ -690,6 +689,17 @@ } .k-error-tb { - background: #FFB380 none repeat scroll 0% 50%; - color: #250; + background: #FFB380 none repeat scroll 0% 50%; + /* color: #250; */ + margin: 0 20px 0 10px; +} + +.k-error-tb img { + margin: 15px 5px 5px 15px; +} + +.k-error-tb span { + position:relative; + top: -7px; + left: 9px; } \ No newline at end of file Modified: trunk/src/main/java/cc/kune/core/public/ws.html =================================================================== --- trunk/src/main/java/cc/kune/core/public/ws.html 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/main/java/cc/kune/core/public/ws.html 2011-02-02 05:37:02 UTC (rev 1232) @@ -8,11 +8,11 @@ <meta name="emite.httpBase" content="/http-bind" /> <meta name="emite.host" content="localhost" /> <meta name="emite.searchHost" content="search.localhost" /> -<!-- <meta name="emite.session" content="login" /> --> + <meta name="emite.session" content="login" /> <meta name="emite.user" content="admin@localhost" /> <meta name="emite.password" content="easyeasy" /> <meta name="hablar.roomService" content="conference.localhost" /> -<meta name="hablar.login" content="false" /> +<!--<meta name="hablar.login" content="true" />--> <meta name="hablar.roster" content="true" /> <meta name="hablar.dockRoster" content="left" /> <meta name="hablar.icons" content="alt" /> Modified: trunk/src/test/java/org/ourproject/kune/FaultyTestSuite.java =================================================================== --- trunk/src/test/java/org/ourproject/kune/FaultyTestSuite.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/test/java/org/ourproject/kune/FaultyTestSuite.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -3,16 +3,20 @@ import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; +import org.ourproject.kune.platf.integration.content.ContentServiceGetTest; +import org.ourproject.kune.platf.integration.content.ContentServiceIntegrationTest; import org.ourproject.kune.platf.server.finders.RateFinderTest; import org.ourproject.kune.platf.server.manager.ContentManagerTest; import org.ourproject.kune.platf.server.manager.UserManagerTest; +import org.ourproject.kune.platf.server.manager.impl.SocialNetworkManagerMoreTest; /** * A Test Suite to test (only) some tests that fails * */ @RunWith(Suite.class) -@SuiteClasses({ RateFinderTest.class, UserManagerTest.class, ContentManagerTest.class }) +@SuiteClasses({ RateFinderTest.class, UserManagerTest.class, SocialNetworkManagerMoreTest.class, + ContentManagerTest.class, ContentServiceIntegrationTest.class, ContentServiceGetTest.class }) public class FaultyTestSuite { } Modified: trunk/src/test/java/org/ourproject/kune/IntegrationTestSuite.java =================================================================== --- trunk/src/test/java/org/ourproject/kune/IntegrationTestSuite.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/test/java/org/ourproject/kune/IntegrationTestSuite.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -4,7 +4,6 @@ import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; import org.ourproject.kune.platf.integration.DatabaseInitializationTest; -import org.ourproject.kune.platf.integration.IntegrationTestHelper; import org.ourproject.kune.platf.integration.content.ContentCommentServiceTest; import org.ourproject.kune.platf.integration.content.ContentServiceAddTest; import org.ourproject.kune.platf.integration.content.ContentServiceGetTest; @@ -26,10 +25,9 @@ * */ @RunWith(Suite.class) -@SuiteClasses({ IntegrationTestHelper.class, UserServiceTest.class, SiteServiceTest.class, - SocialNetworkServiceTest.class, SocialNetworkMembersTest.class, DatabaseInitializationTest.class, - ContentServiceAddTest.class, ContentServiceIntegrationTest.class, ContentCommentServiceTest.class, - ContentServiceVariousTest.class, ContentServiceGetTest.class, ContentServiceSaveTest.class, - GroupServiceTest.class }) +@SuiteClasses({ UserServiceTest.class, SiteServiceTest.class, SocialNetworkServiceTest.class, + SocialNetworkMembersTest.class, DatabaseInitializationTest.class, ContentServiceAddTest.class, + ContentServiceIntegrationTest.class, ContentCommentServiceTest.class, ContentServiceVariousTest.class, + ContentServiceGetTest.class, ContentServiceSaveTest.class, GroupServiceTest.class }) public class IntegrationTestSuite { } Modified: trunk/src/test/java/org/ourproject/kune/ServerTestSuite.java =================================================================== --- trunk/src/test/java/org/ourproject/kune/ServerTestSuite.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/test/java/org/ourproject/kune/ServerTestSuite.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -25,8 +25,7 @@ */ @RunWith(Suite.class) @SuiteClasses({ GroupListTest.class, AccessRightsServiceTest.class, FinderTest.class, KunePropertiesTest.class, - -LicenseFinderTest.class, UserFinderTest.class, GroupFinderTest.class, RateFinderTest.class, + LicenseFinderTest.class, UserFinderTest.class, GroupFinderTest.class, RateFinderTest.class, AuthorizatedMethodInterceptorTest.class, AuthenticatedMethodInterceptorTest.class, MapperTest.class }) public class ServerTestSuite { Modified: trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java =================================================================== --- trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -12,10 +12,10 @@ import com.wideplay.warp.persist.Transactional; public abstract class PersistenceTest { + private final String persistenceUnit; + private final String propetiesFileName; @Inject Provider<EntityManager> provider; - private final String persistenceUnit; - private final String propetiesFileName; public PersistenceTest() { // test: use memory @@ -32,6 +32,10 @@ getManager().getTransaction().commit(); } + protected EntityManager getManager() { + return provider.get(); + } + public EntityTransaction getTransaction() { return getManager().getTransaction(); } @@ -63,8 +67,4 @@ getManager().getTransaction().rollback(); } - protected EntityManager getManager() { - return provider.get(); - } - } Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerMoreTest.java =================================================================== --- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerMoreTest.java 2011-02-02 02:55:03 UTC (rev 1231) +++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerMoreTest.java 2011-02-02 05:37:02 UTC (rev 1232) @@ -74,7 +74,7 @@ final SocialNetworkRequestResult result = socialNetworkManager.requestToJoin(user, group); assertEquals(result, SocialNetworkRequestResult.denied); - closeTransaction(); + rollbackTransaction(); } @Test @@ -84,7 +84,7 @@ final SocialNetworkRequestResult result = socialNetworkManager.requestToJoin(user, group); assertEquals(result, SocialNetworkRequestResult.moderated); assertTrue(group.getSocialNetwork().getPendingCollaborators().getList().contains(userGroup)); - closeTransaction(); + rollbackTransaction(); } @Test @@ -95,7 +95,7 @@ assertEquals(result, SocialNetworkRequestResult.accepted); assertTrue(group.getSocialNetwork().getAccessLists().getEditors().getList().contains(userGroup)); assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NORMAL); - closeTransaction(); + rollbackTransaction(); } @Test @@ -108,7 +108,7 @@ assertEquals(orphanedGroup.getSocialNetwork().getAccessLists().getAdmins().getMode(), GroupListMode.NORMAL); // FIXME Check change group type to PROJECT - closeTransaction(); + rollbackTransaction(); } @Test(expected = AlreadyGroupMemberException.class) @@ -127,7 +127,7 @@ socialNetworkManager.requestToJoin(user, group); socialNetworkManager.requestToJoin(user, group); assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 1); - closeTransaction(); + rollbackTransaction(); } @Test(expected = Exception.class) @@ -153,7 +153,7 @@ assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getList().size(), 1); assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NORMAL); assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0); - closeTransaction(); + rollbackTransaction(); } @Test(expected = AccessViolationException.class) @@ -186,7 +186,7 @@ assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getList().size(), 0); assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NOBODY); assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0); - closeTransaction(); + rollbackTransaction(); } @Test(expected = AccessViolationException.class)
participants (1)
-
Vicente J. Ruiz Jurado