Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ def __init__(
# HTTP/2 always runs over TLS (h2 requires TLS).
self._needs_tls = method in ('JA3', 'JA4') or http2
self._replay_file = self._choose_replay_file()
self._fingerprint_pattern = rf'{self._method}: [a-z0-9_-]+'

tr = Test.AddTestRun(name)
self._configure_dns(tr)
self._configure_server(tr)
self._configure_trafficserver()
self._configure_client(tr)
Test.AddAwaitFileContainsTestRun(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure how this helps. AddAwaitFileContainsTestRun does not wait enough because it finds a wrong line that contains a method name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Or a partial string maybe. If you look at @moonchen 's description in the corresponding issue, the Await succeeded, but then the ContainsExpression failed. This patch makes the two of those to correspond to the same string so they don't get out of sync. That seems like a reasonable thing for me to do, we'll see whether that actually addresses the test flakiness. Sometimes multiple incremental steps need to be done in CI over time to address flakey issues like this.

f'Await jax_fingerprint.log for: {self._name}', self._ts.Disk.jax_log.AbsPath, self._method)
f'Await jax_fingerprint.log for: {self._name}', self._ts.Disk.jax_log.AbsPath, self._fingerprint_pattern)

if self._log_field:
log_field_path = os.path.join(self._ts.Variables.LOGDIR, 'jax_log_field.log')
Expand Down Expand Up @@ -230,7 +231,7 @@ def _configure_trafficserver(self) -> None:
log_path = os.path.join(self._ts.Variables.LOGDIR, 'jax_fingerprint.log')
self._ts.Disk.File(log_path, id='jax_log')
self._ts.Disk.jax_log.Content += Testers.ContainsExpression(
rf'.*{self._method}:.*', f'Verify the log contains a {self._method} fingerprint.', reflags=re.MULTILINE)
self._fingerprint_pattern, f'Verify the jax_fingerprint log contains a {self._method} fingerprint.')

backend = f'{scheme}://jax.backend.test:{server_port}'
backend_no_plugin = f'{scheme}://jax.backend.test:{server_port}'
Expand Down