Fixing tests

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/infrastructure-tests@124133 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-02-12 14:50:32 +00:00
parent 4137b561ca
commit 08b9c4fd1c
1 changed files with 20 additions and 0 deletions

View File

@ -3,6 +3,7 @@
*/
package org.gcube.accounting.persistence;
import java.io.File;
import java.io.StringWriter;
import java.util.Calendar;
@ -132,4 +133,23 @@ public class PersistenceCouchDBTest {
Assert.assertNotEquals(first, second);
}
static final String FALLBACK_FILENAME = "fallback.log";
//@Test
public void testOld(){
File newFile = new File(".", "_d4science.research-infrastructures.eu_gCubeApps_ScalableDataMining.fallback.log");
String oldAccountingFileName = newFile.getName();
int lastIndexOf_ = oldAccountingFileName.lastIndexOf("_");
oldAccountingFileName = oldAccountingFileName.substring(lastIndexOf_+1);
oldAccountingFileName = oldAccountingFileName.replace(
FALLBACK_FILENAME, "accountingFallback.log");
File oldAccountingFile = new File(newFile.getParentFile(), oldAccountingFileName);
logger.debug("New Filename : {}\n Old Filename : {}", newFile, oldAccountingFile);
}
}