Skip to content

Extract fault injection points into dedicated methods #3

@see-quick

Description

@see-quick

The fault injection logic (delays and failures) in StrimziFaultInjectionSourceConnector and StrimziFaultInjectionSourceTask is currently inline Thread.sleep() calls and if + throw blocks mixed in with regular lifecycle code. This makes it hard to quickly identify where faults are being injected. We should extract the fault injection logic into dedicated methods (e.g. maybeInjectDelay(), maybeInjectFailure()) so that all injection points are self-documenting and easy to find.

Main injection points are:

  • StrimziFaultInjectionSourceConnector.start() - delay and failure
  • StrimziFaultInjectionSourceConnector.stop() - delay
  • StrimziFaultInjectionSourceTask.start() - delay and failure
  • StrimziFaultInjectionSourceTask.stop() - delay
  • StrimziFaultInjectionSourceTask.poll() - delay

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions