8000 fix(inkless:test): load inkless_produce_consume_test without the Antithesis SDK by giuseppelillo · Pull Request #887 · aiven/inkless · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion tests/kafkatest/tests/inkless/inkless_produce_consume_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from typing import Dict, Any

from antithesis.assertions import always_or_unreachable, unreachable, reachable
from ducktape.mark import matrix
from ducktape.mark.resource import cluster
from ducktape.tests.test import Test, TestContext
Expand All @@ -26,6 +25,20 @@
from kafkatest.services.verifiable_producer import VerifiableProducer
from kafkatest.utils import is_int_with_prefix

try:
from antithesis.assertions import always_or_unreachable, unreachable, reachable
except ImportError:
# Only the Antithesis driver image installs the SDK. In the ducker image the
# assertions are no-ops, and the plain `assert` that follows each one fails the test.
def always_or_unreachable(condition, message, details):
pass

def unreachable(message, details):
pass

def reachable(message, details):
pass


class InklessProduceConsumeTest(Test):
def __init__(self, test_context: TestContext) -> None:
Expand Down
Loading
0