db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1063906 - in /db/derby/code/branches/10.5: ./ java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockMinion.java java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockTest.java
Date Wed, 26 Jan 2011 22:41:38 GMT
Author: kmarsden
Date: Wed Jan 26 22:41:37 2011
New Revision: 1063906

URL: http://svn.apache.org/viewvc?rev=1063906&view=rev
Log:
DERBY-4985 BootLockTest can fail with ERROR XCY03: Required property 'derby.serviceProtocol'
has not been set with slow configurations


Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockMinion.java
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockTest.java

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 26 22:41:37 2011
@@ -1,2 +1,2 @@
 /db/derby/code/branches/10.6:942027,957000,962738,965351,987678,1055601
-/db/derby/code/trunk:757811,764912,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792434,793089,793588,794106,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,827505,829022,829410,830545,831304,831319,832379,833430,835286,881074,881444,882732,884163,885421,885659,887246,888311,892912,897161,898635,901165,901648,901760,902857,903108,905224,908418,908586,909176,910481,910511,911315,911793,915177,915733,916075,916897,917771,918152,918359,921028,927430,928065,929085,934474,936215,938959,940462,940469,942286,942476,942480,942587,946794,948045,948069,951346,951366,952138,952581,954748,955001,955634,956075,956445,956659,958163,959550,962716,965647,967304,980684,986689,986834,999119,1002291,1002682,1002853,1021426,1025795,1040658,105
 3724,1055169,1062096
+/db/derby/code/trunk:757811,764912,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792434,793089,793588,794106,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,827505,829022,829410,830545,831304,831319,832379,833430,835286,881074,881444,882732,884163,885421,885659,887246,888311,892912,897161,898635,901165,901648,901760,902857,903108,905224,908418,908586,909176,910481,910511,911315,911793,915177,915733,916075,916897,917771,918152,918359,921028,927430,928065,929085,934474,936215,938959,940462,940469,942286,942476,942480,942587,946794,948045,948069,951346,951366,952138,952581,954748,955001,955634,956075,956445,956659,958163,959550,962716,965647,967304,980684,986689,986834,999119,1002291,1002682,1002853,1021426,1025795,1040658,105
 3724,1055169,1062096,1063809

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockMinion.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockMinion.java?rev=1063906&r1=1063905&r2=1063906&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockMinion.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockMinion.java
Wed Jan 26 22:41:37 2011
@@ -24,6 +24,7 @@ package org.apache.derbyTesting.function
 import java.sql.Connection;
 import java.sql.Statement;
 import java.net.Socket;
+import java.io.File;
 import java.lang.Integer;
 
 import org.apache.derby.jdbc.EmbeddedSimpleDataSource;
@@ -53,6 +54,11 @@ public class BootLockMinion {
             stmt = con.createStatement();
 
             stmt.execute("create table t1(i int)");
+            // Once we are finished creating the database and making the
+            // connection, create the file minionComplete that BootLockTest
+            //can check in order to proceed with its work.
+            File checkFile = new File(BootLockTest.minionCompleteFileName);
+            checkFile.createNewFile();
             //infinite loop until we get killed by BootLockTest.java
             for(;;)
             {

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockTest.java?rev=1063906&r1=1063905&r2=1063906&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockTest.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootLockTest.java
Wed Jan 26 22:41:37 2011
@@ -58,6 +58,8 @@ public class BootLockTest extends BaseJD
 
     private final static String dbName = "BootLockTestDB";
     private final static String dbDir = DEFAULT_DB_DIR + File.separator + dbName;
+    public static String minionCompleteFileName = BootLockTest.dbDir + 
+        File.separator + "minionComplete";
     private final static String dbLockFile = dbDir + File.separator +
     DataFactory.DB_LOCKFILE_NAME;
     private final static String dbExLockFile = dbDir + File.separator +
@@ -181,14 +183,12 @@ public class BootLockTest extends BaseJD
         BufferedReader minionSysErr = new BufferedReader(
             new InputStreamReader(p.getErrorStream()));
         String minionErrLine= null ;
+        File checkFile = new File(minionCompleteFileName);
         do {
-            if (lockFile.exists() && servicePropertiesFile.exists()) { 
-                // if the lock file is there and service.properties,
-                // the database has booted, return. If we don't check for
-                // service.properties, we may get just an error that the
-                // directory already exists. We'll give a few seconds too
-                // for service.properties to finish writing.
-                Thread.sleep(3000);
+            if (checkFile.exists()) { 
+                //The checkFile was created by BootLockMinion when we were
+                //sure it was finished with creating the database and making 
+                //the connection. It will get cleaned up with the database.
                 return;
             }
             // otherwise sleep for a second and try again



Mime
View raw message