2016-02-10 15:34:17 +01:00
|
|
|
package org.gcube.accounting.couchdb.query;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
2016-03-17 11:47:50 +01:00
|
|
|
import org.gcube.accounting.persistence.AccountingPersistenceFactory;
|
2016-02-17 14:17:31 +01:00
|
|
|
import org.gcube.testutility.ScopedTest;
|
2016-02-10 15:34:17 +01:00
|
|
|
import org.junit.Test;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
/**
|
2016-10-12 14:24:02 +02:00
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
2016-02-10 15:34:17 +01:00
|
|
|
*/
|
2016-02-12 17:56:12 +01:00
|
|
|
public class CouchDBQueryPluginTest extends ScopedTest {
|
2016-02-10 15:34:17 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Logger
|
|
|
|
*/
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(CouchDBQueryPluginTest.class);
|
|
|
|
|
2016-03-25 16:26:23 +01:00
|
|
|
|
2016-02-10 15:34:17 +01:00
|
|
|
@Test
|
|
|
|
public void testLaunch() throws Exception {
|
2016-03-23 10:55:17 +01:00
|
|
|
logger.debug("Starting to test launch()");
|
2016-03-17 11:47:50 +01:00
|
|
|
AccountingPersistenceFactory.initAccountingPackages();
|
2016-02-10 15:34:17 +01:00
|
|
|
Map<String, Object> inputs = new HashMap<String, Object>();
|
2016-03-23 10:55:17 +01:00
|
|
|
inputs.put(CouchDBQueryPlugin.DELAY_MILLIS, 1000*5); // Delay 10 sec
|
2016-03-17 17:08:25 +01:00
|
|
|
inputs.put(CouchDBQueryPlugin.MAX_RETRY_NUMBER, 0); // No Retry
|
2016-02-10 15:34:17 +01:00
|
|
|
CouchDBQueryPlugin couchDBQueryPlugin = new CouchDBQueryPlugin(null);
|
|
|
|
couchDBQueryPlugin.launch(inputs);
|
2016-03-23 10:55:17 +01:00
|
|
|
logger.debug("-------------- launch() test finished");
|
2016-02-10 15:34:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|