Skip to content
Snippets Groups Projects

Improve array creation

2 files
+ 18
6
Compare changes
  • Side-by-side
  • Inline

Files

@@ -29,9 +29,8 @@
# Tests for experiment execution
import os
import socket
import logging
logger = logging.getLogger(__name__)
import unittest
import json
@@ -39,9 +38,12 @@ import multiprocessing
import tempfile
import shutil
import zmq
from time import time
from time import sleep
from contextlib import closing
from ..scripts import databases_provider
from ..database import Database
from ..data import RemoteDataSource
@@ -50,6 +52,9 @@ from ..data import RemoteException
from . import prefix
logger = logging.getLogger(__name__)
#----------------------------------------------------------
@@ -197,8 +202,13 @@ class TestDatabasesProvider(unittest.TestCase):
view = database.view(input_cfg['protocol'], input_cfg['set'])
view.index(os.path.join(self.cache_root, input_cfg['path']))
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s:
s.bind(('', 0))
port = s.getsockname()[1]
address = '127.0.0.1:%i' % port
args = [
'127.0.0.1:50000',
address,
self.working_dir,
self.cache_root,
]
@@ -210,7 +220,7 @@ class TestDatabasesProvider(unittest.TestCase):
self.client_context = zmq.Context()
self.client_socket = self.client_context.socket(zmq.PAIR)
self.client_socket.connect('tcp://127.0.0.1:50000')
self.client_socket.connect('tcp://%s' % address)
dataformat_name = database.set(input_cfg['protocol'], input_cfg['set'])['outputs'][input_cfg['output']]
Loading