Skip to content

Commit

Permalink
try sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Sep 25, 2024
1 parent 58c8c76 commit fb3818b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/acceptance/test_wineventlog_pseudonymization.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# pylint: disable=missing-docstring
import re
import tempfile
import time
from logging import DEBUG, basicConfig, getLogger
from os import path
from pathlib import Path

import msgspec
Expand All @@ -11,9 +10,7 @@
from logprep.util.configuration import Configuration
from logprep.util.json_handling import parse_jsonl
from tests.acceptance.util import (
get_default_logprep_config,
get_difference,
get_test_output,
start_logprep,
stop_logprep,
wait_for_output,
Expand All @@ -29,6 +26,7 @@ def get_config():
"process_count": 1,
"timeout": 0.1,
"profile_pipelines": False,
"logger": {"level": "DEBUG"},
"pipeline": [
{
"pseudonymizer": {
Expand Down Expand Up @@ -82,7 +80,7 @@ def test_events_pseudonymized_correctly(tmp_path, config: Configuration):
config_path.write_text(config.as_yaml())
proc = start_logprep(config_path)
wait_for_output(proc, "Startup complete")

time.sleep(2)
expected_output_path = (
"tests/testdata/acceptance/expected_result/pseudonymized_win_event_log.jsonl"
)
Expand All @@ -99,7 +97,7 @@ def test_events_pseudonymized_correctly(tmp_path, config: Configuration):
error_output = decoder.decode_lines(error_output)
assert output, "should not be empty"
assert len(error_output) == 0, "There shouldn't be any logprep errors"
assert extra_output, "should not be empty"
assert extra_output, "extra outputs should not be empty"
assert extra_output[5].get("pseudonyms", {}).get("pseudonym"), "should have pseudonym key"
assert extra_output[5].get("pseudonyms", {}).get("origin"), "should have origin key"
assert extra_output[5].get("pseudonyms", {}).get("@timestamp"), "should have @timestamp key"
Expand Down

0 comments on commit fb3818b

Please sign in to comment.