Skip to content
Success

Changes

Summary

  1. Reverted part of r12768
  2. Test code cleanup NamingConflictTest.java Extracted fields to simplify code in test methods. Extracted methods setUpLocal(), tearDown(), addMsg(), modDnMsg(), replayMsg(), createAndAddEntry(), createParentEntry(), createChildEntry(). ModifyConflictTest.java: Made the code a bit more readable.
  3. AttrHistoricalSingle.java: Extracted methods replaceOrDelete(), add(), replace(), delete() and deleteWithoutDeleteTime() to increase code expressiveness.
  4. AssuredReplicationPluginTest.java: Used ReplicationTestCase.waitForSpecificMsg() and waitForSpecificMsgs() to ignore unrelated messages. ReplicationTestCase.java: Added methods: - waitForSpecificMsgs(Session session, Class<?>... msgTypes) - waitForSpecificMsgs(ReplicationBroker broker, Class<?>... msgTypes) Changed <T extends ReplicationMsg> T waitForSpecificMsg(Session session, ReplicationBroker broker, Class<T> msgType) to ReplicationMsg waitForSpecificMsgs(Session session, ReplicationBroker broker, Class<?>... msgTypes)
  5. HistoricalAttributeValueTestCase.java: Added test values.
  6. AttrHistoricalMultiple.java, AttrValueHistorical.java: Improved toString()
  7. Fix random test failure. Tests methods were not properly isolated. The sequence testUpdateDeletedIDs() followed by testUpdateAddedIDs() caused the following failure: 17:42:32 T E S T F A I L U R E ! ! ! 17:42:32 17:42:32 Failed Test: org.opends.server.backends.pluggable.DefaultIndexTest#testUpdateAddedIDs 17:42:32 Failure Cause: java.lang.AssertionError: 17:42:32 Expecting: 17:42:32 <[]> 17:42:32 to contain: 17:42:32 <[1, 2, 3, 4]> 17:42:32 but could not find: 17:42:32 <[1, 2, 3, 4]> 17:42:32 17:42:32 org.opends.server.backends.pluggable.Utils.assertIdsEquals(Utils.java:39) 17:42:32 org.opends.server.backends.pluggable.Utils.assertIdsEquals(Utils.java:51) 17:42:32 org.opends.server.backends.pluggable.DefaultIndexTest.testUpdateAddedIDs(DefaultIndexTest.java:76) DefaultIndexTest.java: In setUp(), use @BeforeMethod annotation (rather than @BeforeTest)
Revision 12771 by JnRouvignac:
Reverted part of r12768
Change TypePath in RepositoryPath in Workspace
The file was modified/trunk/opendj/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.javaopendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java
Revision 12770 by JnRouvignac:
Test code cleanup


NamingConflictTest.java
Extracted fields to simplify code in test methods.
Extracted methods setUpLocal(), tearDown(), addMsg(), modDnMsg(), replayMsg(), createAndAddEntry(), createParentEntry(), createChildEntry().

ModifyConflictTest.java:
Made the code a bit more readable.
Change TypePath in RepositoryPath in Workspace
The file was modified/trunk/opendj/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.javaopendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
The file was modified/trunk/opendj/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/NamingConflictTest.javaopendj-server-legacy/src/test/java/org/opends/server/replication/plugin/NamingConflictTest.java
Revision 12769 by JnRouvignac:
AttrHistoricalSingle.java:
Extracted methods replaceOrDelete(), add(), replace(), delete() and deleteWithoutDeleteTime() to increase code expressiveness.
Change TypePath in RepositoryPath in Workspace
The file was modified/trunk/opendj/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/AttrHistoricalSingle.javaopendj-server-legacy/src/main/java/org/opends/server/replication/plugin/AttrHistoricalSingle.java
Revision 12768 by JnRouvignac:
AssuredReplicationPluginTest.java:
Used ReplicationTestCase.waitForSpecificMsg() and waitForSpecificMsgs() to ignore unrelated messages.

ReplicationTestCase.java:
Added methods:
- waitForSpecificMsgs(Session session, Class<?>... msgTypes)
- waitForSpecificMsgs(ReplicationBroker broker, Class<?>... msgTypes)
Changed
<T extends ReplicationMsg> T waitForSpecificMsg(Session session, ReplicationBroker broker, Class<T> msgType)
to
ReplicationMsg waitForSpecificMsgs(Session session, ReplicationBroker broker, Class<?>... msgTypes)
Change TypePath in RepositoryPath in Workspace
The file was modified/trunk/opendj/opendj-server-legacy/src/test/java/org/opends/server/replication/ReplicationTestCase.javaopendj-server-legacy/src/test/java/org/opends/server/replication/ReplicationTestCase.java
The file was modified/trunk/opendj/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.javaopendj-server-legacy/src/test/java/org/opends/server/replication/plugin/AssuredReplicationPluginTest.java
Revision 12767 by JnRouvignac:
HistoricalAttributeValueTestCase.java:
Added test values.
Change TypePath in RepositoryPath in Workspace
The file was modified/trunk/opendj/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalAttributeValueTestCase.javaopendj-server-legacy/src/test/java/org/opends/server/replication/plugin/HistoricalAttributeValueTestCase.java
Revision 12765 by JnRouvignac:
AttrHistoricalMultiple.java, AttrValueHistorical.java:
Improved toString()
Change TypePath in RepositoryPath in Workspace
The file was modified/trunk/opendj/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/AttrHistoricalMultiple.javaopendj-server-legacy/src/main/java/org/opends/server/replication/plugin/AttrHistoricalMultiple.java
The file was modified/trunk/opendj/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/AttrValueHistorical.javaopendj-server-legacy/src/main/java/org/opends/server/replication/plugin/AttrValueHistorical.java
Revision 12764 by JnRouvignac:
Fix random test failure.
Tests methods were not properly isolated. The sequence testUpdateDeletedIDs() followed by testUpdateAddedIDs() caused the following failure:
17:42:32                  T E S T   F A I L U R E ! ! !
17:42:32
17:42:32 Failed Test:  org.opends.server.backends.pluggable.DefaultIndexTest#testUpdateAddedIDs
17:42:32 Failure Cause:  java.lang.AssertionError:
17:42:32 Expecting:
17:42:32  <[]>
17:42:32 to contain:
17:42:32  <[1, 2, 3, 4]>
17:42:32 but could not find:
17:42:32  <[1, 2, 3, 4]>
17:42:32
17:42:32     org.opends.server.backends.pluggable.Utils.assertIdsEquals(Utils.java:39)
17:42:32     org.opends.server.backends.pluggable.Utils.assertIdsEquals(Utils.java:51)
17:42:32     org.opends.server.backends.pluggable.DefaultIndexTest.testUpdateAddedIDs(DefaultIndexTest.java:76)



DefaultIndexTest.java:
In setUp(), use @BeforeMethod annotation (rather than @BeforeTest)
Change TypePath in RepositoryPath in Workspace
The file was modified/trunk/opendj/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/DefaultIndexTest.javaopendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/DefaultIndexTest.java