From 5a71f4f9aaa7404126b128a52fe02af394a4cc6a Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Mon, 31 May 2010 13:02:21 +0000
Subject: [PATCH] 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.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaBackendTestCase.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaBackendTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaBackendTestCase.java
index ebe436d..36f159f 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/SchemaBackendTestCase.java
+++ b/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"));

--
Gitblit v1.10.0