Skip to content

Commit

Permalink
servstate: unify log assert and done check
Browse files Browse the repository at this point in the history
The startTestServices() test helper uses a special entry in the
service command under test to write the service standard output
also to a log file that can be inspected.

This mechanism suffers from a race condition (as highlighted in
#264) because when the
content of the log file is loaded, the service may not yet have
completed writing to the log.

Since standard output is also verified separately through a
different mechanism, the following changes are made:

- Enhance the global "done check" (previous called "done file") to
  check completion per service. This effectively adds the
  capability previously provided by the log assert mechanism.

- Use the existing "done check" mechanism to wait until the service
  command-line is complete up to the point of the check.

- Only now verify the stdout buffer content as checked previously.

- Remove the log mechanism all together.
  • Loading branch information
flotter authored and jnsgruk committed Aug 1, 2023
1 parent 5a54fa5 commit bf8a4d4
Showing 1 changed file with 94 additions and 90 deletions.
Loading

0 comments on commit bf8a4d4

Please sign in to comment.