mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
23.22.2007 88b3513bbf0f7679c2d6fa44b10933a7fba32bc6
opends/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestVerifyJob.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2006 Sun Microsystems, Inc.
 *      Portions Copyright 2006 - 2007 Sun Microsystems, Inc.
 */
package org.opends.server.backends.jeb;
@@ -389,18 +389,6 @@
      assertTrue(id2entry.putRaw(txn, key1, data1));
      performBECompleteVerify("telephoneNumber", 3);
    }
    /**
     * Change the stored count to invalid value in the telephoneNumber
     * index.
     * @throws Exception if the error count is not equal 1.
     */
    @Test() public void testBadStoredCount() throws Exception {
      preTest(2);
      //whack the count
      setStoredCount(100);
      performBECompleteVerify("telephoneNumber", 1);
    }
    /**
     * 
@@ -425,7 +413,6 @@
      testDN=DN.decode(noParentDN);
      id=new EntryID(12);      
      assertTrue(dn2id.insert(txn, testDN, id));
      setStoredCount(12);
      performBECompleteVerify("dn2id", 3);
    }
    
@@ -452,8 +439,7 @@
      byte[] idBytesp=new byte[16];
      idBytesp[7]=(byte) 0xFF;
      EntryIDSet idSetp=new EntryIDSet(null, idBytesp);
      id2child.writeKey(txn, keyp, idSetp);
      setStoredCount(12);
      id2child.writeKey(txn, keyp, idSetp);
      performBECompleteVerify("id2children", 3);
    }
    
@@ -475,7 +461,6 @@
      EntryIDSet idSetp=new EntryIDSet();    
      DatabaseEntry key= new EntryID(2).getDatabaseEntry();
      id2child.writeKey(txn, key, idSetp);
      setStoredCount(3);
      performBECompleteVerify("id2children", 0);
    }
  
@@ -490,8 +475,7 @@
    public void testVerifyID2Subtree() throws Exception {
      preTest(2);
      //Add entry with no parent
      addID2EntryReturnKey(noParentDN, 3, false);
      setStoredCount(3);
      addID2EntryReturnKey(noParentDN, 3, false);
      performBECompleteVerify("id2subtree", 3);
    }
  
@@ -513,7 +497,6 @@
      EntryIDSet idSet=new EntryIDSet();     
      DatabaseEntry key= new EntryID(2).getDatabaseEntry();
      id2subtree.writeKey(txn, key, idSet);
      setStoredCount(3);
      performBECompleteVerify("id2subtree", 1);
    }
@@ -679,16 +662,6 @@
    }
    
    
    /**
     * Adjust stored entry count in the id2entry file.
     * @param c new count.
     * @throws Exception if the putRaw method fails.
     */
    private void setStoredCount(long c) throws Exception {
      DatabaseEntry keyS= new EntryID(0).getDatabaseEntry();
      DatabaseEntry dataS= new EntryID(c).getDatabaseEntry();
      assertTrue(id2entry.putRaw(txn, keyS, dataS));
    }
 
    /**
     * Does a pretest setup. Creates some number of entries, gets