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

neil_a_wilson
30.27.2007 472ab9f6983def2889f0a4d29a477b1de6349e90
opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/AddSchemaFileTaskTestCase.java
@@ -80,6 +80,15 @@
  public void testAddValidSchemaFile()
         throws Exception
  {
    // Get the last modified timestamp from the schema and then sleep for two
    // milliseconds to make sure that any potential updates to the last
    // modification time that it won't have any chance of happening in the same
    // millisecond as the last update.
    long beforeModifyTimestamp =
              DirectoryServer.getSchema().getYoungestModificationTime();
    Thread.sleep(2);
    SchemaTestMatchingRule matchingRule =
         new SchemaTestMatchingRule("testAddValidSchemaFileMatch",
                                    "1.3.6.1.4.1.26027.1.999.23");
@@ -144,6 +153,8 @@
    Task task = getCompletedTask(DN.decode(taskDNStr));
    assertEquals(task.getTaskState(), TaskState.COMPLETED_SUCCESSFULLY);
    assertFalse(DirectoryServer.getSchema().getYoungestModificationTime() ==
                     beforeModifyTimestamp);
  }
@@ -158,6 +169,15 @@
  public void testAddMultipleValidSchemaFiles()
         throws Exception
  {
    // Get the last modified timestamp from the schema and then sleep for two
    // milliseconds to make sure that any potential updates to the last
    // modification time that it won't have any chance of happening in the same
    // millisecond as the last update.
    long beforeModifyTimestamp =
              DirectoryServer.getSchema().getYoungestModificationTime();
    Thread.sleep(2);
    String schemaDirectory = SchemaConfigManager.getSchemaDirectoryPath();
@@ -267,6 +287,8 @@
    Task task = getCompletedTask(DN.decode(taskDNStr));
    assertEquals(task.getTaskState(), TaskState.COMPLETED_SUCCESSFULLY);
    assertFalse(DirectoryServer.getSchema().getYoungestModificationTime() ==
                     beforeModifyTimestamp);
  }
@@ -351,6 +373,15 @@
  public void testAddEmptySchemaFile()
         throws Exception
  {
    // Get the last modified timestamp from the schema and then sleep for two
    // milliseconds to make sure that any potential updates to the last
    // modification time that it won't have any chance of happening in the same
    // millisecond as the last update.
    long beforeModifyTimestamp =
              DirectoryServer.getSchema().getYoungestModificationTime();
    Thread.sleep(2);
    String schemaDirectory = SchemaConfigManager.getSchemaDirectoryPath();
    File emptyFile = new File(schemaDirectory, "05-empty.ldif");
@@ -380,6 +411,8 @@
    Task task = getCompletedTask(DN.decode(taskDNStr));
    assertEquals(task.getTaskState(), TaskState.COMPLETED_SUCCESSFULLY);
    assertFalse(DirectoryServer.getSchema().getYoungestModificationTime() ==
                     beforeModifyTimestamp);
  }