From b28ac2da3cf9aa58e58eb3fb47511e9a663533b2 Mon Sep 17 00:00:00 2001 From: Manuel Soulier Date: Fri, 27 Oct 2023 14:55:22 +0200 Subject: [PATCH] fix: zonky weird --- .../dao/GenericPreparedStatementBuilderTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arc-utils/src/test/java/fr/insee/arc/utils/dao/GenericPreparedStatementBuilderTest.java b/arc-utils/src/test/java/fr/insee/arc/utils/dao/GenericPreparedStatementBuilderTest.java index ac2053ac3..7a20e26c2 100644 --- a/arc-utils/src/test/java/fr/insee/arc/utils/dao/GenericPreparedStatementBuilderTest.java +++ b/arc-utils/src/test/java/fr/insee/arc/utils/dao/GenericPreparedStatementBuilderTest.java @@ -10,23 +10,24 @@ public class GenericPreparedStatementBuilderTest extends InitializeQueryTest { @Test public void copyFromGenericBean() throws ArcException { - UtilitaireDao.get(0).executeImmediate(c, "DROP SCHEMA IF EXISTS test CASCADE;"); - UtilitaireDao.get(0).executeImmediate(c, "CREATE SCHEMA test;"); + + UtilitaireDao.get(0).executeImmediate(c, "DROP SCHEMA IF EXISTS arc_bas9 CASCADE;"); + UtilitaireDao.get(0).executeImmediate(c, "CREATE SCHEMA arc_bas9;"); // create a test table with 26 lines - UtilitaireDao.get(0).executeImmediate(c, "CREATE TABLE test.table_test as select i as id, chr(i+64) as val, array[i,i+1] as arr, current_date as dd from generate_series(1,26) i;"); + UtilitaireDao.get(0).executeImmediate(c, "CREATE TABLE arc_bas9.table_test as select i as id, chr(i+64) as val, array[i,i+1] as arr, current_date as dd from generate_series(1,26) i;"); // the content will grab the first 10 lines of test table - GenericBean gb= new GenericBean(UtilitaireDao.get(0).executeRequest(c, new GenericPreparedStatementBuilder("SELECT * FROM test.table_test where id<=10"))); + GenericBean gb= new GenericBean(UtilitaireDao.get(0).executeRequest(c, new GenericPreparedStatementBuilder("SELECT * FROM arc_bas9.table_test where id<=10"))); // copy the content into a target table using copyFromGenericBean GenericPreparedStatementBuilder query = new GenericPreparedStatementBuilder(); - query.copyFromGenericBean("test.table_test_copy", gb); + query.copyFromGenericBean("arc_bas9.table_test_copy", gb); UtilitaireDao.get(0).executeRequest(c, query); // test result - testMetadataAndNumberOfRecords("test.table_test_copy", 10, new String[] {"id", "val", "arr", "dd"}); - UtilitaireDao.get(0).executeImmediate(c, "DROP SCHEMA IF EXISTS test CASCADE;"); + testMetadataAndNumberOfRecords("arc_bas9.table_test_copy", 10, new String[] {"id", "val", "arr", "dd"}); + UtilitaireDao.get(0).executeImmediate(c, "DROP SCHEMA IF EXISTS arc_bas9 CASCADE;"); }