mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 02:18:39 +08:00
Fixes to new disconnected tests; add a version that doesn't use MVC
This commit is contained in:
parent
de863d170d
commit
c82d820bfd
@ -183,7 +183,11 @@ if(NOT WIN32)
|
|||||||
NAME disconnected_timeout_unit_tests
|
NAME disconnected_timeout_unit_tests
|
||||||
COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
|
COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
|
||||||
@CLUSTER_FILE@
|
@CLUSTER_FILE@
|
||||||
fdb
|
)
|
||||||
|
add_unavailable_fdbclient_test(
|
||||||
|
NAME disconnected_timeout_external_client_unit_tests
|
||||||
|
COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
|
||||||
|
@CLUSTER_FILE@
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/libfdb_c.so
|
${CMAKE_CURRENT_BINARY_DIR}/libfdb_c.so
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -7,6 +7,7 @@ import sys
|
|||||||
from local_cluster import LocalCluster
|
from local_cluster import LocalCluster
|
||||||
from argparse import ArgumentParser, RawDescriptionHelpFormatter
|
from argparse import ArgumentParser, RawDescriptionHelpFormatter
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from random import choice
|
||||||
|
|
||||||
class ClusterFileGenerator:
|
class ClusterFileGenerator:
|
||||||
def __init__(self, output_dir: str):
|
def __init__(self, output_dir: str):
|
||||||
@ -16,12 +17,12 @@ class ClusterFileGenerator:
|
|||||||
self.tmp_dir = self.output_dir.joinpath(
|
self.tmp_dir = self.output_dir.joinpath(
|
||||||
'tmp',
|
'tmp',
|
||||||
''.join(choice(LocalCluster.valid_letters_for_secret) for i in range(16)))
|
''.join(choice(LocalCluster.valid_letters_for_secret) for i in range(16)))
|
||||||
tmp_dir.mkdir(parents=True)
|
self.tmp_dir.mkdir(parents=True)
|
||||||
self.cluster_file_path = self.tmp_dir.joinpath('fdb.cluster')
|
self.cluster_file_path = self.tmp_dir.joinpath('fdb.cluster')
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
with open(self.cluster_file_path, 'x') as f:
|
with open(self.cluster_file_path, 'x') as f:
|
||||||
f.write('foo:bar@1.1.1.1:5678')
|
f.write('foo:bar@1.1.1.1:5678\n')
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user