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
|
||||
COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
|
||||
@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
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -7,6 +7,7 @@ import sys
|
|||
from local_cluster import LocalCluster
|
||||
from argparse import ArgumentParser, RawDescriptionHelpFormatter
|
||||
from pathlib import Path
|
||||
from random import choice
|
||||
|
||||
class ClusterFileGenerator:
|
||||
def __init__(self, output_dir: str):
|
||||
|
@ -16,12 +17,12 @@ class ClusterFileGenerator:
|
|||
self.tmp_dir = self.output_dir.joinpath(
|
||||
'tmp',
|
||||
''.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')
|
||||
|
||||
def __enter__(self):
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue