Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14855

Harden integration testing logic for asserting that a connector is deleted

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.7.0
    • connect
    • None

    Description

      In the Connect embedded integration testing framework, the EmbeddedConnectClusterAssertions::assertConnectorAndTasksAreStopped method is used in several places to verify that a connector has been deleted. (This method may be renamed in an upcoming PR to something like assertConnectorAndTasksAreNotRunning, but apart from that, its usage and semantics will remain unchanged.) However, the underlying logic for that assertion doesn't strictly check for deletion (which can be done by verifying that the connector and its tasks no longer appear in the REST API at all), since it also allows for the Connector or tasks to appear in the REST API, but with a state that is not RUNNING.

      This constraint is a bit too lax and may be silently masking issues with our shutdown logic for to-be-deleted connectors. We should try to narrow the criteria for that method so that it fails if the Connector or any of its tasks still appear in the REST API, even with a non-RUNNING state.

      However, we should also be careful to ensure that current uses of that method are not relying on its semantics. If, for some reason, a test case requires the existing semantics, we should evaluate whether it's necessary to continue to rely on those semantics, and if so, probably preserve the existing method so that it can be used wherever applicable (but rewrite all other tests to use the new, stricter method).

      Attachments

        Issue Links

          Activity

            People

              yash.mayya Yash Mayya
              ChrisEgerton Chris Egerton
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: