[jboss-jira] [JBoss JIRA] Commented: (JBPORTAL-1826) Registration data is not properly persisted on updates.

Julien Viet (JIRA) jira-events at lists.jboss.org
Fri Nov 30 08:58:46 EST 2007


    [ http://jira.jboss.com/jira/browse/JBPORTAL-1826?page=comments#action_12389971 ] 
            
Julien Viet commented on JBPORTAL-1826:
---------------------------------------

I commited a test case and a bug fix for this issue.

You should consider merge the tests written in org.jboss.portal.test.registration.RegistrationTestCase in the class org.jboss.portal.test.registration.AbstractRegistrationPersistenceManagerTestCase because those tests are executed against the hibernate implementation in core.

I added the following test case in AbstractRegistrationPersistenceManagerTestCase

   public void testBulkUpdateRegistrationProperties() throws Exception
   {
      startInteraction();
      ConsumerGroup group = getManager().createConsumerGroup("Foo");
      Consumer consumer = getManager().createConsumer("Bar", "Bar");
      group.addConsumer(consumer);
      getManager().addRegistrationFor("Bar", registrationProperties);
      stopInteraction();

      //
      startInteraction();
      consumer = getManager().getConsumerById("Bar");
      Registration reg = (Registration)consumer.getRegistrations().iterator().next();
      registrationProperties.remove(new QName("prop1"));
      reg.updateProperties(registrationProperties);
      assertEquals(Collections.singletonMap(new QName("prop2"), "value2"), reg.getProperties());
      stopInteraction();

      //
      startInteraction();
      consumer = getManager().getConsumerById("Bar");
      reg = (Registration)consumer.getRegistrations().iterator().next();
      assertEquals(Collections.singletonMap(new QName("prop2"), "value2"), reg.getProperties());
      registrationProperties.put(new QName("prop3"), "value3");
      reg.updateProperties(registrationProperties);
      assertEquals(MapBuilder.hashMap().put(new QName("prop2"), "value2").put(new QName("prop3"), "value3").get(), reg.getProperties());
      stopInteraction();

      //
      startInteraction();
      consumer = getManager().getConsumerById("Bar");
      reg = (Registration)consumer.getRegistrations().iterator().next();
      assertEquals(MapBuilder.hashMap().put(new QName("prop2"), "value2").put(new QName("prop3"), "value3").get(), reg.getProperties());
      stopInteraction();
   }



> Registration data is not properly persisted on updates.
> -------------------------------------------------------
>
>                 Key: JBPORTAL-1826
>                 URL: http://jira.jboss.com/jira/browse/JBPORTAL-1826
>             Project: JBoss Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Portal WSRP
>    Affects Versions: 2.6.2 Final
>            Reporter: Chris Laprun
>         Assigned To: Chris Laprun
>             Fix For: 2.6.3 Final
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list