test: more strict finding of WARN, ERROR lines (#3798)

this prevents flakyness when `WARN|ERROR` appears in some other part of
the line, for example in a random filename.
This commit is contained in:
Joonas Koivunen
2023-03-14 15:27:52 +02:00
committed by GitHub
parent 3d869cbcde
commit 15b692ccc9

View File

@@ -2154,7 +2154,7 @@ class NeonPageserver(PgProtocol):
def assert_no_errors(self):
logfile = open(os.path.join(self.env.repo_dir, "pageserver.log"), "r")
error_or_warn = re.compile("ERROR|WARN")
error_or_warn = re.compile(r"\s(ERROR|WARN)")
errors = []
while True:
line = logfile.readline()