From bcca91fee16b3d588cae941c783909c1e5444405 Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Thu, 7 Dec 2023 13:13:39 +0000 Subject: [PATCH] @TestConfiguration Configuration commented out --- .../orgrolemapping/controller/BaseTest.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/integrationTest/java/uk/gov/hmcts/reform/orgrolemapping/controller/BaseTest.java b/src/integrationTest/java/uk/gov/hmcts/reform/orgrolemapping/controller/BaseTest.java index c2174553a..2ce4d052c 100644 --- a/src/integrationTest/java/uk/gov/hmcts/reform/orgrolemapping/controller/BaseTest.java +++ b/src/integrationTest/java/uk/gov/hmcts/reform/orgrolemapping/controller/BaseTest.java @@ -90,36 +90,36 @@ public abstract class BaseTest { // Force re-initialisation of base types for each test suite } - @TestConfiguration - static class Configuration { - Connection connection; - - @Bean - public EmbeddedPostgres embeddedPostgres() throws IOException { - return EmbeddedPostgres - .builder() - .start(); - } - - @Bean - public DataSource dataSource(@Autowired EmbeddedPostgres pg) throws Exception { - - final Properties props = new Properties(); - // Instruct JDBC to accept JSON string for JSONB - props.setProperty("stringtype", "unspecified"); - props.setProperty("user", "postgres"); - connection = DriverManager.getConnection(pg.getJdbcUrl("postgres"), props); - return new SingleConnectionDataSource(connection, true); - } - - - @PreDestroy - public void contextDestroyed() throws SQLException { - if (connection != null) { - connection.close(); - } - } - } +// @TestConfiguration +// static class Configuration { +// Connection connection; +// +// @Bean +// public EmbeddedPostgres embeddedPostgres() throws IOException { +// return EmbeddedPostgres +// .builder() +// .start(); +// } +// +// @Bean +// public DataSource dataSource(@Autowired EmbeddedPostgres pg) throws Exception { +// +// final Properties props = new Properties(); +// // Instruct JDBC to accept JSON string for JSONB +// props.setProperty("stringtype", "unspecified"); +// props.setProperty("user", "postgres"); +// connection = DriverManager.getConnection(pg.getJdbcUrl("postgres"), props); +// return new SingleConnectionDataSource(connection, true); +// } +// +// +// @PreDestroy +// public void contextDestroyed() throws SQLException { +// if (connection != null) { +// connection.close(); +// } +// } +// } public static class WireMockServerInitializer implements ApplicationContextInitializer {