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.
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.backends; |
| | | |
| | |
| | | * |
| | | * @throws Exception If an unexpected problem occurs. |
| | | */ |
| | | @Test(enabled=false) |
| | | @Test |
| | | public void testLastModAttributes() |
| | | throws Exception |
| | | { |
| | |
| | | "-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")); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | "-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); |
| | |
| | | "-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); |