fix: cleanup PR 1
This commit is contained in:
parent
386a772e0d
commit
31b0a0d600
|
@ -110,6 +110,8 @@ __pycache__/
|
|||
report/results.xml
|
||||
tests-functional/coverage
|
||||
tests-functional/reports
|
||||
tests-functional/local
|
||||
tests-functional/status-backend
|
||||
tests-functional/*.log
|
||||
|
||||
# generated files
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
.idea/
|
||||
.local/
|
|
@ -32,7 +32,7 @@ class SignalClient:
|
|||
raise TimeoutError(
|
||||
f"Signal {signal_type} is not received in {timeout} seconds")
|
||||
time.sleep(0.2)
|
||||
logger.debug(f"Signal {signal_type} is received in {round(time.time() - start_time)} seconds")
|
||||
logger.info(f"Signal {signal_type} is received in {round(time.time() - start_time)} seconds")
|
||||
return self.received_signals[signal_type][0]
|
||||
|
||||
def wait_for_complete_signal(self, signal_type, timeout=5):
|
||||
|
@ -46,7 +46,7 @@ class SignalClient:
|
|||
time.sleep(0.2)
|
||||
|
||||
if events:
|
||||
logger.debug(
|
||||
logger.info(
|
||||
f"Collected {len(events)} events of type {signal_type} within {timeout} seconds")
|
||||
return events
|
||||
raise TimeoutError(f"No signals of type {signal_type} received in {timeout} seconds")
|
||||
|
|
|
@ -10,7 +10,7 @@ from pathlib import Path
|
|||
|
||||
logger = get_custom_logger(__name__)
|
||||
GO_PROJECT_ROOT = Path(__file__).resolve().parents[3]
|
||||
SOURCE_DIR = GO_PROJECT_ROOT / "cmd/status-backend"
|
||||
SOURCE_DIR = GO_PROJECT_ROOT / "build/bin"
|
||||
DEST_DIR = GO_PROJECT_ROOT / "tests-functional"
|
||||
BINARY_PATH = SOURCE_DIR / "status-backend"
|
||||
REPORTS_DIR = DEST_DIR / "reports"
|
||||
|
@ -36,7 +36,7 @@ def get_project_root() -> str:
|
|||
|
||||
|
||||
def write_signal_to_file(signal_data):
|
||||
with open(LOG_FILE_PATH, "a") as file:
|
||||
with open(LOG_FILE_PATH, "a+") as file:
|
||||
json.dump(signal_data, file)
|
||||
file.write("\n")
|
||||
|
||||
|
|
Loading…
Reference in New Issue