Sfoglia il codice sorgente

minor improvements to the ckpt tests

(Logical change 1.167)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@570 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 21 anni fa
parent
commit
3111e9f5eb
1 ha cambiato i file con 13 aggiunte e 14 eliminazioni
  1. 13 14
      test/testckpt.c

+ 13 - 14
test/testckpt.c

@@ -177,25 +177,24 @@ int main (void) {
 	printf ("%s: initial open of checkpoint\n",
 		get_test_output (error, SA_AIS_OK));
 
+	
+	error = saCkptSectionCreate (checkpointHandle,
+        &sectionCreationAttributes1,
+        "Initial Data #0",
+        strlen ("Initial Data #0") + 1);
+
+    printf ("%s: checkpoint section create\n",
+        get_test_output (error, SA_AIS_OK));
+
 	gettimeofday (&tv_start, 0);
 	sectionCreationAttributes1.expirationTime = ((unsigned long long)(tv_start.tv_sec + SECONDS_TO_EXPIRE)) * ((unsigned long long)1000000000) + ((unsigned long long)(tv_start.tv_usec) * ((unsigned long long)1000));
 
-	error = saCkptSectionCreate (checkpointHandle,
-		&sectionCreationAttributes1,
-		"Initial Data #0",
-		strlen ("Initial Data #0") + 1);
-
-	printf ("%s: checkpoint section create\n",
+	error = saCkptSectionExpirationTimeSet (checkpointHandle,
+		&sectionId1,
+		sectionCreationAttributes1.expirationTime);
+	printf ("%s: checkpoint section expiration set\n",
 		get_test_output (error, SA_AIS_OK));
 
-	if (error != SA_OK) {
-		error = saCkptSectionExpirationTimeSet (checkpointHandle,
-			&sectionId1,
-			sectionCreationAttributes1.expirationTime);
-		printf ("%s: checkpoint section expiration set\n",
-			get_test_output (error, SA_AIS_OK));
-	}
-
 printf ("Please wait, testing expiry of checkpoint sections.\n");
 	do {
 	error = saCkptCheckpointRead (checkpointHandle,