|
1 | 1 | package openjdbcproxy.jdbc; |
2 | 2 |
|
3 | 3 | import org.junit.Assert; |
| 4 | +import org.junit.jupiter.api.Assumptions; |
| 5 | +import org.junit.jupiter.api.BeforeAll; |
4 | 6 | import org.junit.jupiter.params.ParameterizedTest; |
5 | 7 | import org.junit.jupiter.params.provider.CsvFileSource; |
6 | 8 |
|
|
17 | 19 |
|
18 | 20 | public class BinaryStreamIntegrationTest { |
19 | 21 |
|
| 22 | + private static boolean isTestDisabled; |
| 23 | + |
| 24 | + @BeforeAll |
| 25 | + public static void setup() { |
| 26 | + isTestDisabled = Boolean.parseBoolean(System.getProperty("disablePostgresTests", "false")); |
| 27 | + } |
| 28 | + |
20 | 29 | @ParameterizedTest |
21 | 30 | @CsvFileSource(resources = "/postgres_connection.csv") |
22 | 31 | public void createAndReadingBinaryStreamSuccessful(String driverClass, String url, String user, String pwd) throws SQLException, ClassNotFoundException, IOException { |
| 32 | + Assumptions.assumeFalse(isTestDisabled, "Skipping Postgres tests"); |
| 33 | + |
23 | 34 | Class.forName(driverClass); |
24 | 35 | Connection conn = DriverManager.getConnection(url, user, pwd); |
25 | 36 |
|
@@ -90,6 +101,8 @@ insert into test_table_blob (val_blob1, val_blob2) values (?, ?) |
90 | 101 | @ParameterizedTest |
91 | 102 | @CsvFileSource(resources = "/postgres_connection.csv") |
92 | 103 | public void createAndReadingLargeBinaryStreamSuccessful(String driverClass, String url, String user, String pwd) throws SQLException, ClassNotFoundException, IOException { |
| 104 | + Assumptions.assumeFalse(isTestDisabled, "Skipping Postgres tests"); |
| 105 | + |
93 | 106 | Class.forName(driverClass); |
94 | 107 | Connection conn = DriverManager.getConnection(url, user, pwd); |
95 | 108 |
|
|
0 commit comments