11import unittest
22from feldera import PipelineBuilder , Pipeline
3+ from feldera .testutils import unique_pipeline_name
34from tests import TEST_CLIENT
45
56
67class NegativeCompilationTests (unittest .TestCase ):
78 def test_sql_error (self ):
8- pipeline_name = "sql_error"
9+ pipeline_name = unique_pipeline_name ( "sql_error" )
910 sql = """
1011CREATE TABLE student(
1112 id INT,
@@ -30,7 +31,7 @@ def test_sql_error(self):
3031 pipeline .clear_storage ()
3132
3233 def test_rust_error (self ):
33- pipeline_name = "rust_error"
34+ pipeline_name = unique_pipeline_name ( "rust_error" )
3435 sql = ""
3536
3637 with self .assertRaises (Exception ) as err :
@@ -42,7 +43,7 @@ def test_rust_error(self):
4243
4344 def test_program_error0 (self ):
4445 sql = "create taabl;"
45- name = "test_program_error0"
46+ name = unique_pipeline_name ( "test_program_error0" )
4647 try :
4748 _ = PipelineBuilder (TEST_CLIENT , name , sql ).create_or_replace ()
4849 except Exception :
@@ -55,7 +56,7 @@ def test_program_error0(self):
5556
5657 def test_program_error1 (self ):
5758 sql = ""
58- name = "test_program_error1"
59+ name = unique_pipeline_name ( "test_program_error1" )
5960 _ = PipelineBuilder (TEST_CLIENT , name , sql ).create_or_replace ()
6061 pipeline = Pipeline .get (name , TEST_CLIENT )
6162 err = pipeline .program_error ()
@@ -66,7 +67,7 @@ def test_program_error1(self):
6667
6768 def test_errors0 (self ):
6869 sql = "SELECT invalid"
69- name = "test_errors0"
70+ name = unique_pipeline_name ( "test_errors0" )
7071 try :
7172 _ = PipelineBuilder (TEST_CLIENT , name , sql ).create_or_replace ()
7273 except Exception :
@@ -94,7 +95,7 @@ def test_initialization_error(self):
9495 );
9596 """
9697 pipeline = PipelineBuilder (
97- TEST_CLIENT , name = "test_initialization_error" , sql = sql
98+ TEST_CLIENT , name = unique_pipeline_name ( "test_initialization_error" ) , sql = sql
9899 ).create_or_replace ()
99100 with self .assertRaises (RuntimeError ) as err :
100101 pipeline .start ()
0 commit comments