77 * where we're validating specific cluster mechanisms
88 */
99class Redis_Cluster_Testextends Redis_Test {
10- private static $ _arr_node_map = [];
11-
1210private $ _arr_redis_types = [
1311 Redis::REDIS_STRING ,
1412 Redis::REDIS_SET ,
@@ -23,6 +21,7 @@ class Redis_Cluster_Test extends Redis_Test {
2321 RedisCluster::FAILOVER_DISTRIBUTE
2422 ];
2523
24+ protected static $ _arr_node_map = [];
2625/**
2726 * @var string
2827 */
@@ -74,15 +73,16 @@ public function testSession_lockWaitTime() { return $this->markTestSkipped(); }
7473public function __construct ($ str_host ,$ i_port ,$ str_auth ) {
7574parent ::__construct ($ str_host ,$ i_port ,$ str_auth );
7675
77- $ str_nodemap_file =dirname ($ _SERVER ['PHP_SELF ' ]) .'/nodes/nodemap ' ;
78-
79- if (!file_exists ($ str_nodemap_file )) {
80- fprintf (STDERR ,"Error: Can't find nodemap file for seeds! \n" );
81- exit (1 );
82- }
83-
76+ self ::$ _arr_node_map =preg_split ('/\s+/ ' ,getenv ('REDIS_CLUSTER_NODES ' ));
8477/* Store our node map */
8578if (!self ::$ _arr_node_map ) {
79+ $ str_nodemap_file =dirname ($ _SERVER ['PHP_SELF ' ]) .'/nodes/nodemap ' ;
80+
81+ if (!file_exists ($ str_nodemap_file )) {
82+ fprintf (STDERR ,"Error: Can't find nodemap file for seeds! \n" );
83+ exit (1 );
84+ }
85+
8686self ::$ _arr_node_map =array_filter (
8787explode ("\n" ,file_get_contents ($ str_nodemap_file )
8888 ));