From 340c70e3cb0ba52c4abd70eceb7b4bbfb877d35c Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Sun, 26 May 2013 21:31:36 +0000
Subject: [PATCH] CR-1739 Fix replication mode and one tasks testcase on Windows

---
 opends/tests/staf-tests/shared/functions/environment.xml |   61 ------------------------------
 1 files changed, 1 insertions(+), 60 deletions(-)

diff --git a/opends/tests/staf-tests/shared/functions/environment.xml b/opends/tests/staf-tests/shared/functions/environment.xml
index dea95c1..57cc419 100755
--- a/opends/tests/staf-tests/shared/functions/environment.xml
+++ b/opends/tests/staf-tests/shared/functions/environment.xml
@@ -24,7 +24,7 @@
  ! CDDL HEADER END
  !
  !      Copyright 2007-2010 Sun Microsystems, Inc.
- !      Portions Copyright 2011 ForgeRock AS.
+ !      Portions Copyright 2011-2013 ForgeRock AS.
  ! -->
 <stax>
   
@@ -178,65 +178,6 @@
         MultimasterSync = 'Multimaster Synchronization'
         MultimasterType = 'multimaster'
 
-        # TODO: this test flow for replication tests needs moving out to configuration
-        # Replication execution mode variables: if not defined, set "random"
-        # values:
-        #   (day of the month % 4) == 0 --> (split servers, eclmode n/a)
-        #   (day of the month % 4) == 1 --> (don't split, opends eclmode)
-        #   (day of the month % 4) == 2 --> (don't split, draft eclmode)
-        #   (day of the month % 4) == 3 --> (don't split, eclmode n/a)
-        import time
-        monthday          = time.localtime()[2]
-        rewriteConfigFile = False
-        
-        if REPLICATION_SPLIT_SERVERS == '':
-          rewriteConfigFile = True
-          oldSplitConfig    = """REPLICATION_SPLIT_SERVERS     = ''"""
-          if monthday % 4 == 0:
-            REPLICATION_SPLIT_SERVERS = 'true'
-          else:
-            REPLICATION_SPLIT_SERVERS = 'false'        
-          newSplitConfig    = """REPLICATION_SPLIT_SERVERS     = '%s'""" % \
-                              REPLICATION_SPLIT_SERVERS
-        else:
-          newSplitConfig    = """REPLICATION_SPLIT_SERVERS     = '%s'""" % \
-                              REPLICATION_SPLIT_SERVERS
-          oldSplitConfig    = newSplitConfig
-        
-        if REPLICATION_ECL_MODE == '':
-          rewriteConfigFile = True
-          oldEclmodeConfig = """REPLICATION_ECL_MODE          = ''"""
-          if monthday % 4 == 1:
-            REPLICATION_ECL_MODE = 'opends'
-          elif monthday % 4 == 2:
-            REPLICATION_ECL_MODE = 'draft'
-          else:
-            REPLICATION_ECL_MODE = 'n/a'
-          newEclmodeConfig  = """REPLICATION_ECL_MODE          = '%s'""" % \
-                              REPLICATION_ECL_MODE
-        else:
-          newEclmodeConfig  = """REPLICATION_ECL_MODE          = '%s'""" % \
-                              REPLICATION_ECL_MODE
-          oldEclmodeConfig  = newEclmodeConfig 
-
-        
-        # Rewrite the randomly chosen variables in config.py file
-        if rewriteConfigFile == True :
-          import re
-          splitRegEx   = re.compile(oldSplitConfig)
-          eclmodeRegEx = re.compile(oldEclmodeConfig)
-
-          configFile   = STAXJobScriptFiles[0]
-          configInput  = open(configFile, 'r')
-          c0           = configInput.read()
-          c1           = splitRegEx.sub(newSplitConfig, c0)
-          content      = eclmodeRegEx.sub(newEclmodeConfig, c1)
-          configInput.close()
-        
-          configOutput = open(configFile,'w')
-          configOutput.write(content)
-          configOutput.close()
-
         # Create staf objects
         LOCAL_STAF_ROOT  = test_env.staf(STAF_LOCAL_HOSTNAME).root
         REMOTE_STAF_ROOT = test_env.staf(STAF_REMOTE_HOSTNAME).root

--
Gitblit v1.10.0