Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
Test portability fix.
Browse files Browse the repository at this point in the history
the 'redis-sentinel' binary is not currently built on Windows, the quick
workaround is to call 'redis-server --sentinel'
  • Loading branch information
enricogior committed Jun 9, 2015
1 parent 2975545 commit bf260ec
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/instances.tcl
Expand Up @@ -59,13 +59,12 @@ proc spawn_instance {type base_port count {conf {}}} {

# Finally exec it and remember the pid for later cleanup.
if {$type eq "redis"} {
set prgname redis-server
set pid [exec ../../../src/redis-server $cfgfile &] ;# WIN_PORT_ISSUE
} elseif {$type eq "sentinel"} {
set prgname redis-sentinel
set pid [exec ../../../src/redis-server $cfgfile --sentinel &] ;# WIN_PORT_ISSUE
} else {
error "Unknown instance type."
}
set pid [exec ../../../src/${prgname} $cfgfile &]
lappend ::pids $pid

# Check availability
Expand Down Expand Up @@ -396,11 +395,10 @@ proc restart_instance {type id} {
# Execute the instance with its old setup and append the new pid
# file for cleanup.
if {$type eq "redis"} {
set prgname redis-server
set pid [exec ../../../src/redis-server $cfgfile &] ;# WIN_PORT_ISSUE
} else {
set prgname redis-sentinel
set pid [exec ../../../src/redis-server $cfgfile --sentinel &] ;# WIN_PORT_ISSUE
}
set pid [exec ../../../src/${prgname} $cfgfile &]
set_instance_attrib $type $id pid $pid
lappend ::pids $pid

Expand Down

0 comments on commit bf260ec

Please sign in to comment.