Skip to content

From predicate does not use watermark argument correctly #127

@davidkhess

Description

@davidkhess

Unless I'm missing something there's a bug at https://github.com/ionelmc/python-hunter/blob/master/src/hunter/predicates.py#L389C1-L390C1

            if delta_depth < self.watermark:

I believe the polarity of this check is reversed and should be:

            if delta_depth > self.watermark:

As it is, for any positive value of watermark, the From will correctly trigger on condition but on the next event it will immediately disable regardless of the actual depth requested by watermark.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions