Fixing a test failure in Continuous Integration.
See the test failure stack trace at the bottom of this commit message.
ECLReplicationServerPreTest(), the very first test of ExternalChangeLogTest, expects external changelog to be disabled.
However, when GroupIdHandshakeTest was run before ExternalChangeLogTest but never removed ECL virtual attributes.
This led to the "lastChangeNumber" virtual attribute having an actual value of "0" while it was expected it would not exist on the returned entry.
Moved the total responsibility of maintaining the virtual attributes to VirtualAttributeConfigManager.
Ensured the ECL virtual attributes are removed on ECL shutdown.
VirtualAttributeConfigManager.java:
Do not call anymore the DirectoryServer.(de)registerVirtualAttribute() methods.
Added getVirtualAttributes(), register(), deregister(), getDummyDN().
In loadProvider(), removed the use of reflection.
DirectoryServer.java:
Removed virtualAttributes field.
Delegated getVirtualAttributes(), registerVirtualAttribute(), deregisterVirtualAttribute() calls to VirtualAttributeConfigManager.
Removed replaceVirtualAttribute().
ReplicationServer.java:
Renamed externalChangeLogWorkflowID field to eclWorkflowID and externalChangeLogWorkflowImpl field to eclWorkflowImpl.
Changed eclWorkflowImpl to use an AtomicReference.
In enableECL(), used AotmicReference.compareAndSet() to avoid multiple threads initializing at the same time.
Renamed enableECLVirtualAttr() to buildVirtualAttributeRule() + extracted the call to DirectoryServer.registerVirtualAttribute() outside.
In buildVirtualAttributeRule(), used Collections.* methods.
In shutdownECL(), deregister the virtual attributes added by the enableECL().
[testng] T E S T F A I L U R E ! ! !
[testng]
[testng] Failed Test: org.opends.server.replication.server.ExternalChangeLogTest#ECLReplicationServerPreTest
[testng] Failure Cause: java.lang.AssertionError: expected:<null> but was:<0>
[testng] org.testng.Assert.fail(Assert.java:84)
[testng] org.testng.Assert.failNotEquals(Assert.java:438)
[testng] org.testng.Assert.assertEquals(Assert.java:108)
[testng] org.testng.Assert.assertEquals(Assert.java:129)
[testng] org.testng.Assert.assertEquals(Assert.java:139)
[testng] org.opends.server.replication.server.ExternalChangeLogTest.ECLCompatTestLimits(ExternalChangeLogTest.java:2560)
[testng] org.opends.server.replication.server.ExternalChangeLogTest.ECLIsNotASupportedSuffix(ExternalChangeLogTest.java:407)
[testng] org.opends.server.replication.server.ExternalChangeLogTest.ECLReplicationServerPreTest(ExternalChangeLogTest.java:167)