diff --git a/arc-utils/src/test/java/fr/insee/arc/utils/query/TestDatabase.java b/arc-utils/src/test/java/fr/insee/arc/utils/query/TestDatabase.java index cfccb4992..d6b0b0cde 100644 --- a/arc-utils/src/test/java/fr/insee/arc/utils/query/TestDatabase.java +++ b/arc-utils/src/test/java/fr/insee/arc/utils/query/TestDatabase.java @@ -21,21 +21,17 @@ private static Connection instanciateTestDatabase() pg = EmbeddedPostgres.start(); connection = pg.getPostgresDatabase().getConnection(); - String user = connection.getMetaData().getUserName(); - String database = UtilitaireDao.get(0).getString(connection, new GenericPreparedStatementBuilder("select current_database()")); - - System.out.println("§§§§§§§"); - System.out.println(user); - - UtilitaireDao.get(0).executeImmediate(connection, "GRANT CREATE ON DATABASE "+database+" TO "+user+";"); + String version = UtilitaireDao.get(0).getString(connection, new GenericPreparedStatementBuilder("select version()")); + System.out.println("§§§§§"); + System.out.println(version); - } catch (IOException | SQLException e) { connection = null; } catch (ArcException e) { connection = null; + } return connection; }