diff --git a/src/test/unit/AllTests.java b/src/test/unit/AllTests.java index 17e05d0..81651fa 100644 --- a/src/test/unit/AllTests.java +++ b/src/test/unit/AllTests.java @@ -46,6 +46,7 @@ UtilsTest.class, PAnnotateBlastResultTest.class, CmdLineQueryTest.class, + PFTPLoaderTest.class }) public class AllTests { diff --git a/src/test/unit/AsperaCmdTest.java b/src/test/unit/AsperaCmdTest.java index 9a7e94e..d92daa1 100644 --- a/src/test/unit/AsperaCmdTest.java +++ b/src/test/unit/AsperaCmdTest.java @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Patrick G. Durand +/* Copyright (C) 2019-2021 Patrick G. Durand * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -52,7 +52,7 @@ public class AsperaCmdTest { //convenient way to bypass download tests (use only during debugging) private static boolean doDownload = true; private static boolean doDownloadNCBI = true; - private static boolean doDownloadEBI = true; + private static boolean doDownloadEBI = false; private static final Log LOGGER = LogFactory .getLog(DBMSAbstractConfig.KDMS_ROOTLOG_CATEGORY diff --git a/src/test/unit/PFTPLoaderTest.java b/src/test/unit/PFTPLoaderTest.java index 8753bc4..83c8892 100755 --- a/src/test/unit/PFTPLoaderTest.java +++ b/src/test/unit/PFTPLoaderTest.java @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2017 Ludovic Antin +/* Copyright (C) 2007-2021 Ludovic Antin, Patrick Durand * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -42,12 +42,12 @@ public void setUp() throws Exception { _dbConf = new DBServerConfig(); } - private DBMSFtpFile createFtpFileToDownload(String filename) { + private DBMSFtpFile createFtpFileToDownload(String filename, String remoteDir, long size) { FTPFile ftpFile = new FTPFile(); ftpFile.setName(filename); ftpFile.setTimestamp(Calendar.getInstance()); - ftpFile.setSize(10000); - return new DBMSFtpFile("databank/uniprot_multi/", ftpFile); + ftpFile.setSize(size); + return new DBMSFtpFile(remoteDir, ftpFile); } @Test @@ -63,8 +63,7 @@ public void testDownload() { } File first = new File(_dbConf.getLocalTmpFolder(), "uniprot-aquaporine.dat"); - File second = new File(_dbConf.getLocalTmpFolder(), - "uniprot-glucuronidase.dat"); + File second = new File(_dbConf.getLocalTmpFolder(), "uniprot-glucuronidase.dat"); File third = new File(_dbConf.getLocalTmpFolder(), "uniprot-kinase.dat"); first.delete(); @@ -72,9 +71,9 @@ public void testDownload() { third.delete(); ArrayList validNames = new ArrayList(); - validNames.add(createFtpFileToDownload(first.getName())); - validNames.add(createFtpFileToDownload(second.getName())); - validNames.add(createFtpFileToDownload(third.getName())); + validNames.add(createFtpFileToDownload(first.getName(), _dbConf.getRemoteFolders(), 4478l)); + validNames.add(createFtpFileToDownload(second.getName(), _dbConf.getRemoteFolders(), 421780l)); + validNames.add(createFtpFileToDownload(third.getName(), _dbConf.getRemoteFolders(), 85948l)); PFTPLoaderEngine loaderEngine = new PFTPLoaderEngine(_dbConf, null, validNames); ((PFTPLoaderEngine) loaderEngine).setScheduleTime(1000); diff --git a/tests/junit/databank/uniprot_multi/sample_multiple_uniprot.dsc b/tests/junit/databank/uniprot_multi/sample_multiple_uniprot.dsc index b710252..785c995 100755 --- a/tests/junit/databank/uniprot_multi/sample_multiple_uniprot.dsc +++ b/tests/junit/databank/uniprot_multi/sample_multiple_uniprot.dsc @@ -9,11 +9,11 @@ tasks.unit.post=idxsw tasks.global.post=formatdb(lclid=false;check=true;nr=true) -ftp.server=192.168.1.18 +ftp.server=ftp.ifremer.fr ftp.port=21 ftp.uname=anonymous ftp.pswd=user@company.com -ftp.rdir=/unittests/uniprot_multi +ftp.rdir=/ifremer/dataref/bioinfo/sebimer/devel/beedeem/unit-tests/uniprot_multi ftp.rdir.exclude= history=0