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

ludovicp
31.02.2010 5a71f4f9aaa7404126b128a52fe02af394a4cc6a
Fix issue #2604 - Unit-tests should wait for TimeThread to increment before testing the modify timestamp attribute. This also fixes another unit-test which fails on Windows.
2 files modified
13 ■■■■■ changed files
opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaBackendTestCase.java 7 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDIFDiffTestCase.java 6 ●●●● patch | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaBackendTestCase.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 */
package org.opends.server.backends;
@@ -5359,7 +5359,7 @@
   *
   * @throws  Exception  If an unexpected problem occurs.
   */
  @Test(enabled=false)
  @Test
  public void testLastModAttributes()
         throws Exception
  {
@@ -5401,6 +5401,9 @@
      "-f", path
    };
    // Sleep longer than the TimeThread delay to ensure the modifytimestamp
    // will be different.
    Thread.sleep(600);
    assertEquals(LDAPModify.mainModify(args, false, null, System.err), 0);
    schemaEntry = DirectoryServer.getEntry(DN.decode("cn=schema"));
opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDIFDiffTestCase.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 */
package org.opends.server.tools;
@@ -614,7 +614,7 @@
      "-O"
    };
    if (ignoreAttributesFile.endsWith("/does-not-exist"))
    if (ignoreAttributesFile.endsWith("does-not-exist"))
    {
      // We expect this to fail, so just make sure that it does.
      assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 1);
@@ -701,7 +701,7 @@
      "-O"
    };
    if (ignoreEntriesFile.endsWith("/does-not-exist"))
    if (ignoreEntriesFile.endsWith("does-not-exist"))
    {
      // We expect this to fail, so just make sure that it does.
      assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 1);