[Git][ultreiaio/ird-t3][develop] update test fixtures for ATL [skip ci]
Tony CHEMIT pushed to branch develop at ultreiaio / ird-t3 Commits: 8179f9e0 by Tony CHEMIT at 2018-03-08T17:45:06Z update test fixtures for ATL [skip ci] - - - - - 4 changed files: - t3-actions/src/main/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionITSupport.java - t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/MSAccessTestConfiguration.java - t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AtlanticOceanFixtures.java - t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionAtlanticOceanIT.java Changes: ===================================== t3-actions/src/main/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionITSupport.java ===================================== --- a/t3-actions/src/main/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionITSupport.java +++ b/t3-actions/src/main/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionITSupport.java @@ -113,30 +113,26 @@ public abstract class AnalyzeInputSourceActionITSupport { if (outputWriter != null) { outputWriter.flush(); outputWriter.close(); + log.info(new String(Files.readAllBytes(outputFile.toPath()))); } } void testExecute(OceanFixtures fixture) throws Exception { - testExecute( - fixture.nbSafe(), - fixture.nbUnsafe(), - fixture.nbSafeWithoutWell(), - fixture.nbUnsafeWithoutWell(), - TripType.STANDARD, - false, - false - ); + serviceContext.getMsConfig().setUseWells(false); + testExecute(fixture.nbSafe(), fixture.nbUnsafe(), fixture.nbSafeWithoutWell(), fixture.nbUnsafeWithoutWell(), TripType.STANDARD, false, false); + serviceContext.getMsConfig().setUseWells(true); + testExecute(fixture.nbSafe(), fixture.nbUnsafe(), fixture.nbSafeWithoutWell(), fixture.nbUnsafeWithoutWell(), TripType.STANDARD, false, false); } public void testExecute(int nbSafe, int nbUnsafe, - int nbSafeWithoutwell, + int nbSafeWithoutWell, int nbUnsafeWithoutWell) throws Exception { testExecute( nbSafe, nbUnsafe, - nbSafeWithoutwell, + nbSafeWithoutWell, nbUnsafeWithoutWell, TripType.STANDARD, false, @@ -168,13 +164,15 @@ public abstract class AnalyzeInputSourceActionITSupport { Set<Trip> unsafeTrips = action.getResultAsSet(AnalyzeInputSourceAction.RESULT_UNSAFE_TRIPS, Trip.class); Assert.assertNotNull(unsafeTrips); outputWriter.write(String.format("found %d unsafe trip(s).\n", unsafeTrips.size())); + + log.info(String.format("\n[%s](useWells?%b) safe : %d - unsafe : %d\n", msConfig.dbName, msConfig.isUseWells(), safeTrips.size(), unsafeTrips.size())); + List<String> messages; if (log.isWarnEnabled()) { messages = action.getWarnMessages(); if (CollectionUtils.isNotEmpty(messages)) { for (String message : messages) { - log.warn(String.format("[WARNING] %s\n", message)); -// outputWriter.write(String.format("[WARNING] %s\n", message)); + outputWriter.write(String.format("[WARNING] %s\n", message)); } } } @@ -187,9 +185,6 @@ public abstract class AnalyzeInputSourceActionITSupport { } } - outputWriter.flush(); - log.info(String.format("\n[%s] safe : %d - unsafe : %d\n", msConfig.dbName, safeTrips.size(), unsafeTrips.size())); - log.info(new String(Files.readAllBytes(outputFile.toPath()))); if (msConfig.isUseWells()) { Assert.assertEquals(nbSafe, safeTrips.size()); Assert.assertEquals(nbUnsafe, unsafeTrips.size()); ===================================== t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/MSAccessTestConfiguration.java ===================================== --- a/t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/MSAccessTestConfiguration.java +++ b/t3-actions/src/main/java/fr/ird/t3/actions/io/input/test/MSAccessTestConfiguration.java @@ -188,4 +188,8 @@ public class MSAccessTestConfiguration { public String getProviderId() { return providerId; } + + public void setUseWells(boolean useWells) { + this.useWells = useWells; + } } ===================================== t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AtlanticOceanFixtures.java ===================================== --- a/t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AtlanticOceanFixtures.java +++ b/t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/AtlanticOceanFixtures.java @@ -30,73 +30,73 @@ import fr.ird.t3.actions.io.input.test.OceanFixtures; */ public enum AtlanticOceanFixtures implements OceanFixtures { - OA_1960(318, 36, 352, 2), - OA_1961(298, 63, 361, 0), - OA_1962(184, 133, 317, 0), - OA_1963(218, 157, 375, 0), - OA_1964(121, 61, 182, 0), - OA_1965(93, 31, 124, 0), - OA_1966(70, 27, 97, 0), - OA_1967(53, 27, 80, 0), - OA_1968(46, 14, 60, 0), - OA_1969(64, 21, 86, 0), - - OA_1970(318, 36, 352, 2), - OA_1971(298, 63, 361, 0), - OA_1972(184, 133, 317, 0), - OA_1973(218, 157, 375, 0), - OA_1974(121, 61, 182, 0), - OA_1975(93, 31, 124, 0), - OA_1976(70, 27, 97, 0), - OA_1977(53, 27, 80, 0), - OA_1978(46, 14, 60, 0), - OA_1979(64, 21, 86, 0), - - OA_1980(318, 36, 352, 2), - OA_1981(298, 63, 361, 0), - OA_1982(184, 133, 317, 0), - OA_1983(218, 157, 375, 0), - OA_1984(121, 61, 182, 0), - OA_1985(93, 31, 124, 0), - OA_1986(70, 27, 97, 0), - OA_1987(53, 27, 80, 0), - OA_1988(46, 14, 60, 0), - OA_1989(64, 21, 86, 0), - - OA_1990(318, 36, 352, 2), - OA_1991(298, 63, 361, 0), - OA_1992(184, 133, 317, 0), - OA_1993(218, 157, 375, 0), - OA_1994(121, 61, 182, 0), - OA_1995(93, 31, 124, 0), - OA_1996(70, 27, 97, 0), - OA_1997(53, 27, 80, 0), - OA_1998(46, 14, 60, 0), - OA_1999(64, 21, 86, 0), + OA_1960(151, 0), + OA_1961(159, 0), + OA_1962(203, 0), + OA_1963(807, 0), + OA_1964(709, 0), + OA_1965(911, 0), + OA_1966(942, 0), + OA_1967(993, 0), + OA_1968(1339, 0), + OA_1969(453, 1179), + OA_1970(289, 970), + OA_1971(146, 1047), + OA_1972(143, 1069), + OA_1973(235, 890), + OA_1974(254, 948), + OA_1975(248, 709), + OA_1976(149, 692), + OA_1977(40, 761), + OA_1978(56, 766), + OA_1979(76, 618), + OA_1980(324, 299), + OA_1981(365, 280), + OA_1982(416, 247), + OA_1983(343, 257), + OA_1984(297, 111), + OA_1985(325, 115), + OA_1986(214, 121), + OA_1987(186, 165), + OA_1988(212, 156), + OA_1989(192, 154), + OA_1990(141, 192), + OA_1991(268, 0), + OA_1992(250, 0), + OA_1993(281, 2), + OA_1994(278, 0), + OA_1995(243, 3), + OA_1996(90, 142), + OA_1997(36, 178), + OA_1998(205, 2), + OA_1999(323, 5), OA_2000(318, 36, 352, 2), - OA_2001(298, 63, 361, 0), - OA_2002(184, 133, 317, 0), - OA_2003(218, 157, 375, 0), - OA_2004(121, 61, 182, 0), + OA_2001(298, 63, 358, 3), + OA_2002(184, 133, 316, 1), + OA_2003(218, 157, 369, 6), + OA_2004(121, 61, 181, 1), OA_2005(93, 31, 124, 0), OA_2006(70, 27, 97, 0), - OA_2007(53, 27, 80, 0), + OA_2007(53, 27, 77, 3), OA_2008(46, 14, 60, 0), OA_2009(64, 21, 86, 0), - OA_2010(75, 13, 87, 0), OA_2011(75, 13, 91, 1), OA_2012(75, 13, 97, 0), OA_2013(75, 13, 103, 0), - OA_2014(75, 13, 91, 0), - OA_2015(75, 13, 80, 8); + OA_2014(75, 13, 90, 0), + OA_2015(75, 13, 103, 0); private final int nbSafe; private final int nbUnsafe; private final int nbSafeWithoutWell; private final int nbUnsafeWithoutWell; + AtlanticOceanFixtures(int nbSafeWithoutWell, int nbUnsafeWithoutWell) { + this(nbSafeWithoutWell, nbUnsafeWithoutWell, nbSafeWithoutWell, nbUnsafeWithoutWell); + } + AtlanticOceanFixtures(int nbSafe, int nbUnsafe, int nbSafeWithoutWell, int nbUnsafeWithoutWell) { this.nbSafe = nbSafe; this.nbUnsafe = nbUnsafe; ===================================== t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionAtlanticOceanIT.java ===================================== --- a/t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionAtlanticOceanIT.java +++ b/t3-input-avdthv35/src/test/java/fr/ird/t3/actions/io/input/it/AnalyzeInputSourceActionAtlanticOceanIT.java @@ -33,7 +33,6 @@ import org.junit.Test; * @author Tony Chemit - dev@tchemit.fr * @since 1.0 */ -@Ignore public class AnalyzeInputSourceActionAtlanticOceanIT extends AnalyzeInputSourceActionITSupport implements T3AVDTHV35TestAtlanticOcean { @Test View it on GitLab: https://gitlab.com/ultreiaio/ird-t3/commit/8179f9e0fc8ff6ae190c4d147c345e4f1... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-t3/commit/8179f9e0fc8ff6ae190c4d147c345e4f1... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT