From 3d1927abdd524c18896cd0addeffeb4f9b05f5e0 Mon Sep 17 00:00:00 2001 From: frankvicky Date: Sun, 24 Nov 2024 13:18:50 +0800 Subject: [PATCH] cleanup e2e unused import --- .../services/performance/end_to_end_latency.py | 1 - tests/kafkatest/services/security/kafka_acls.py | 1 - .../tests/client/consumer_protocol_migration_test.py | 2 +- tests/kafkatest/tests/connect/connect_test.py | 1 - tests/kafkatest/tests/core/kraft_upgrade_test.py | 2 +- .../tests/core/replication_replica_failure_test.py | 6 ------ tests/kafkatest/tests/core/snapshot_test.py | 2 +- .../tests/core/transactions_mixed_versions_test.py | 3 +-- .../kafkatest/tests/core/transactions_upgrade_test.py | 1 - tests/kafkatest/tests/streams/streams_upgrade_test.py | 11 +++++------ 10 files changed, 9 insertions(+), 21 deletions(-) diff --git a/tests/kafkatest/services/performance/end_to_end_latency.py b/tests/kafkatest/services/performance/end_to_end_latency.py index e7e0100e5114..d3d5a0e0e41f 100644 --- a/tests/kafkatest/services/performance/end_to_end_latency.py +++ b/tests/kafkatest/services/performance/end_to_end_latency.py @@ -17,7 +17,6 @@ from kafkatest.services.kafka.util import fix_opts_for_new_jvm from kafkatest.services.performance import PerformanceService -from kafkatest.services.security.security_config import SecurityConfig from kafkatest.version import get_version, V_3_4_0, DEV_BRANCH diff --git a/tests/kafkatest/services/security/kafka_acls.py b/tests/kafkatest/services/security/kafka_acls.py index 5bd1a46f5977..1cdb64039c64 100644 --- a/tests/kafkatest/services/security/kafka_acls.py +++ b/tests/kafkatest/services/security/kafka_acls.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import time class ACLs: def __init__(self, context): diff --git a/tests/kafkatest/tests/client/consumer_protocol_migration_test.py b/tests/kafkatest/tests/client/consumer_protocol_migration_test.py index 07f501fe0c69..f703cbadd568 100644 --- a/tests/kafkatest/tests/client/consumer_protocol_migration_test.py +++ b/tests/kafkatest/tests/client/consumer_protocol_migration_test.py @@ -18,7 +18,7 @@ from ducktape.mark.resource import cluster from kafkatest.tests.verifiable_consumer_test import VerifiableConsumerTest -from kafkatest.services.kafka import TopicPartition, quorum, consumer_group +from kafkatest.services.kafka import quorum, consumer_group from kafkatest.version import LATEST_2_1, LATEST_2_3, LATEST_2_4, LATEST_2_5, \ LATEST_3_2, LATEST_3_4, LATEST_3_5, LATEST_3_6, LATEST_3_7, LATEST_3_8, LATEST_3_9, DEV_BRANCH, KafkaVersion diff --git a/tests/kafkatest/tests/connect/connect_test.py b/tests/kafkatest/tests/connect/connect_test.py index 692d5a8ee7e7..8614da7be97c 100644 --- a/tests/kafkatest/tests/connect/connect_test.py +++ b/tests/kafkatest/tests/connect/connect_test.py @@ -20,7 +20,6 @@ from ducktape.cluster.remoteaccount import RemoteCommandError from ducktape.errors import TimeoutError -from kafkatest.services.zookeeper import ZookeeperService from kafkatest.services.kafka import KafkaService, quorum from kafkatest.services.connect import ConnectServiceBase, ConnectStandaloneService, ErrorTolerance from kafkatest.services.console_consumer import ConsoleConsumer diff --git a/tests/kafkatest/tests/core/kraft_upgrade_test.py b/tests/kafkatest/tests/core/kraft_upgrade_test.py index 604ffa01803b..4677257ea1e6 100644 --- a/tests/kafkatest/tests/core/kraft_upgrade_test.py +++ b/tests/kafkatest/tests/core/kraft_upgrade_test.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ducktape.mark import parametrize, matrix +from ducktape.mark import matrix from ducktape.mark.resource import cluster from ducktape.utils.util import wait_until from kafkatest.services.console_consumer import ConsoleConsumer diff --git a/tests/kafkatest/tests/core/replication_replica_failure_test.py b/tests/kafkatest/tests/core/replication_replica_failure_test.py index 6e644ce5a22b..1cfaf8ab423d 100644 --- a/tests/kafkatest/tests/core/replication_replica_failure_test.py +++ b/tests/kafkatest/tests/core/replication_replica_failure_test.py @@ -17,19 +17,13 @@ from ducktape.cluster.remoteaccount import RemoteCommandError from ducktape.mark import matrix -from ducktape.mark import parametrize from ducktape.mark.resource import cluster from kafkatest.services.kafka import quorum, consumer_group from kafkatest.tests.end_to_end import EndToEndTest -from kafkatest.services.kafka import config_property from kafkatest.services.trogdor.network_partition_fault_spec import NetworkPartitionFaultSpec -from kafkatest.services.trogdor.task_spec import TaskSpec from kafkatest.services.trogdor.trogdor import TrogdorService -import signal -import time - class ReplicationReplicaFailureTest(EndToEndTest): def __init__(self, test_context): diff --git a/tests/kafkatest/tests/core/snapshot_test.py b/tests/kafkatest/tests/core/snapshot_test.py index 25ffd4227e31..cb7c4e3acda0 100644 --- a/tests/kafkatest/tests/core/snapshot_test.py +++ b/tests/kafkatest/tests/core/snapshot_test.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ducktape.mark import parametrize, matrix +from ducktape.mark import matrix from ducktape.mark.resource import cluster from ducktape.utils.util import wait_until diff --git a/tests/kafkatest/tests/core/transactions_mixed_versions_test.py b/tests/kafkatest/tests/core/transactions_mixed_versions_test.py index 3347e114a770..fea29fd19dd5 100644 --- a/tests/kafkatest/tests/core/transactions_mixed_versions_test.py +++ b/tests/kafkatest/tests/core/transactions_mixed_versions_test.py @@ -17,11 +17,10 @@ from kafkatest.services.kafka.quorum import isolated_kraft from kafkatest.services.console_consumer import ConsoleConsumer from kafkatest.services.verifiable_producer import VerifiableProducer -from kafkatest.services.transactional_message_copier import TransactionalMessageCopier from kafkatest.utils import is_int from kafkatest.utils.transactions_utils import create_and_start_copiers from kafkatest.version import LATEST_3_1, LATEST_3_2, LATEST_3_3, LATEST_3_4, LATEST_3_5, \ - LATEST_3_6, LATEST_3_7, LATEST_3_8, LATEST_3_9, DEV_BRANCH, KafkaVersion, LATEST_STABLE_METADATA_VERSION + LATEST_3_6, LATEST_3_7, LATEST_3_8, LATEST_3_9, DEV_BRANCH, KafkaVersion from ducktape.tests.test import Test from ducktape.mark import matrix diff --git a/tests/kafkatest/tests/core/transactions_upgrade_test.py b/tests/kafkatest/tests/core/transactions_upgrade_test.py index 5c72a6fa806c..7a5af448df44 100644 --- a/tests/kafkatest/tests/core/transactions_upgrade_test.py +++ b/tests/kafkatest/tests/core/transactions_upgrade_test.py @@ -17,7 +17,6 @@ from kafkatest.services.kafka.quorum import isolated_kraft from kafkatest.services.console_consumer import ConsoleConsumer from kafkatest.services.verifiable_producer import VerifiableProducer -from kafkatest.services.transactional_message_copier import TransactionalMessageCopier from kafkatest.utils import is_int from kafkatest.utils.transactions_utils import create_and_start_copiers from kafkatest.version import LATEST_3_1, LATEST_3_2, LATEST_3_3, LATEST_3_4, LATEST_3_5, \ diff --git a/tests/kafkatest/tests/streams/streams_upgrade_test.py b/tests/kafkatest/tests/streams/streams_upgrade_test.py index fe6ad8ae16c6..c6dc89364b36 100644 --- a/tests/kafkatest/tests/streams/streams_upgrade_test.py +++ b/tests/kafkatest/tests/streams/streams_upgrade_test.py @@ -15,16 +15,15 @@ import random import time -from ducktape.mark import matrix, ignore +from ducktape.mark import matrix from ducktape.mark.resource import cluster from ducktape.tests.test import Test from kafkatest.services.kafka import KafkaService, quorum -from kafkatest.services.streams import StreamsSmokeTestDriverService, StreamsSmokeTestJobRunnerService, \ - StreamsUpgradeTestJobRunnerService +from kafkatest.services.streams import StreamsSmokeTestDriverService, StreamsUpgradeTestJobRunnerService from kafkatest.tests.streams.utils import extract_generation_from_logs, extract_generation_id -from kafkatest.version import LATEST_2_1, LATEST_2_2, LATEST_2_3, LATEST_2_4, LATEST_2_5, LATEST_2_6, LATEST_2_7, LATEST_2_8, \ - LATEST_3_0, LATEST_3_1, LATEST_3_2, LATEST_3_3, LATEST_3_4, LATEST_3_5, LATEST_3_6, LATEST_3_7, LATEST_3_8, LATEST_3_9, \ - DEV_BRANCH, DEV_VERSION, KafkaVersion +from kafkatest.version import LATEST_2_4, LATEST_2_5, LATEST_2_6, LATEST_2_7, LATEST_2_8, LATEST_3_0, LATEST_3_1, \ + LATEST_3_2, LATEST_3_3, LATEST_3_4, LATEST_3_5, LATEST_3_6, LATEST_3_7, LATEST_3_8, LATEST_3_9, DEV_BRANCH,\ + DEV_VERSION, KafkaVersion # broker 0.10.0 is not compatible with newer Kafka Streams versions # broker 0.10.1 and 0.10.2 do not support headers, as required by suppress() (since v2.2.1)