[Tarantool-patches] [PATCH v5 2/3] test: add a test for wal_cleanup_delay option

Cyrill Gorcunov gorcunov at gmail.com
Fri Mar 26 16:57:57 MSK 2021


On Fri, Mar 26, 2021 at 04:37:26PM +0300, Serge Petrenko wrote:
> > +box.cfg({
> > +    listen              = os.getenv("LISTEN"),
> > +    replication         = os.getenv("MASTER"),
> > +})
> 
> Hi! Thanks for the fixes!
> 
> You may  use `replica.lua` here freely. It takes the same parameters, and
> has the same
> box.cfg() call, with exception that it has set `replication_timeout` and
> `memtx_memory`.
> These two options are not a problem. In fact, `replica.lua` is used in
> almost all
> replication tests.
> 
> So, there's no reason to spawn a new file for your needs.

Indeed, pushed an update.
---
diff --git a/test/replication/gh-5806-slave.lua b/test/replication/gh-5806-slave.lua
deleted file mode 100644
index 3abb3e035..000000000
--- a/test/replication/gh-5806-slave.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env tarantool
-
-require('console').listen(os.getenv('ADMIN'))
-
-box.cfg({
-    listen              = os.getenv("LISTEN"),
-    replication         = os.getenv("MASTER"),
-})
diff --git a/test/replication/gh-5806-xlog-cleanup.result b/test/replication/gh-5806-xlog-cleanup.result
index e20784bcc..523d400a7 100644
--- a/test/replication/gh-5806-xlog-cleanup.result
+++ b/test/replication/gh-5806-xlog-cleanup.result
@@ -64,7 +64,7 @@ test_run:switch('default')
  | - true
  | ...
 test_run:cmd('create server replica with rpl_master=master,\
-              script="replication/gh-5806-slave.lua"')
+              script="replication/replica.lua"')
  | ---
  | - true
  | ...
@@ -239,7 +239,7 @@ test_run:switch('default')
  | - true
  | ...
 test_run:cmd('create server replica with rpl_master=master,\
-              script="replication/gh-5806-slave.lua"')
+              script="replication/replica.lua"')
  | ---
  | - true
  | ...
@@ -372,7 +372,7 @@ test_run:switch('default')
  | - true
  | ...
 test_run:cmd('create server replica with rpl_master=master,\
-              script="replication/gh-5806-slave.lua"')
+              script="replication/replica.lua"')
  | ---
  | - true
  | ...
diff --git a/test/replication/gh-5806-xlog-cleanup.test.lua b/test/replication/gh-5806-xlog-cleanup.test.lua
index ea3a35294..f16be758a 100644
--- a/test/replication/gh-5806-xlog-cleanup.test.lua
+++ b/test/replication/gh-5806-xlog-cleanup.test.lua
@@ -35,7 +35,7 @@ _ = s:create_index('pk')
 
 test_run:switch('default')
 test_run:cmd('create server replica with rpl_master=master,\
-              script="replication/gh-5806-slave.lua"')
+              script="replication/replica.lua"')
 test_run:cmd('start server replica with wait=True, wait_load=True')
 
 --
@@ -118,7 +118,7 @@ _ = s:create_index('pk')
 
 test_run:switch('default')
 test_run:cmd('create server replica with rpl_master=master,\
-              script="replication/gh-5806-slave.lua"')
+              script="replication/replica.lua"')
 test_run:cmd('start server replica with wait=True, wait_load=True')
 
 test_run:switch('replica')
@@ -167,7 +167,7 @@ box.schema.user.grant('guest', 'replication')
 
 test_run:switch('default')
 test_run:cmd('create server replica with rpl_master=master,\
-              script="replication/gh-5806-slave.lua"')
+              script="replication/replica.lua"')
 test_run:cmd('start server replica with wait=True, wait_load=True')
 
 test_run:switch('master')


More information about the Tarantool-patches mailing list