Skip to content

Commit

Permalink
Add a test for SELECT 💣();
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Jul 4, 2024
1 parent c4a906a commit e159030
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test_runner/regress/test_boom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pytest
from fixtures.neon_fixtures import NeonEnvBuilder


def test_boom(neon_env_builder: NeonEnvBuilder):
"""
Test that calling `SELECT 💣();` (from neon_test_utils) crashes the endpoint
"""
env = neon_env_builder.init_start()
env.neon_cli.create_branch("test_💣")
endpoint = env.endpoints.create_start("test_💣")

endpoint.safe_psql("CREATE EXTENSION neon_test_utils;")
with pytest.raises(Exception, match="This probably means the server terminated abnormally"):
endpoint.safe_psql("SELECT 💣();")

0 comments on commit e159030

Please sign in to comment.