def _test_data_exist(*_): local_client_ref = test_actor.promise_ref(StorageClientActor.default_uid()) remote_client_ref = test_actor.promise_ref(StorageClientActor.default_uid(), address=remote_pool_addr) targets = [DataStorageDevice.PROC_MEMORY] return local_client_ref.get_object(session_id, chunk_key, targets, _promise=True) \ .then(lambda local_data: remote_client_ref.get_object( session_id, chunk_key, targets, _promise=True) .then(lambda remote_data: assert_array_equal(local_data, remote_data))) \
def start_transfer_test_pool(**kwargs): address = kwargs.pop('address') plasma_size = kwargs.pop('plasma_size') with create_actor_pool(n_process=1, backend='gevent', address=address, **kwargs) as pool: pool.create_actor(SchedulerClusterInfoActor, [address], uid=SchedulerClusterInfoActor.default_uid()) pool.create_actor(WorkerClusterInfoActor, [address], uid=WorkerClusterInfoActor.default_uid()) pool.create_actor(PlasmaKeyMapActor, uid=PlasmaKeyMapActor.default_uid()) pool.create_actor(StorageManagerActor, uid=StorageManagerActor.default_uid()) pool.create_actor(ChunkMetaActor, uid=ChunkMetaActor.default_uid()) pool.create_actor(DispatchActor, uid=DispatchActor.default_uid()) pool.create_actor(QuotaActor, 1024 * 1024 * 20, uid=MemQuotaActor.default_uid()) shared_holder_ref = pool.create_actor( SharedHolderActor, plasma_size, uid=SharedHolderActor.default_uid()) pool.create_actor(StatusActor, address, uid=StatusActor.default_uid()) pool.create_actor(IORunnerActor) pool.create_actor(StorageClientActor, uid=StorageClientActor.default_uid()) pool.create_actor(InProcHolderActor) yield pool shared_holder_ref.destroy()