infrastructure-tests/src/test/java/org/gcube/accounting/couchdb/query/CouchDBQueryPluginTest.java

44 lines
1.1 KiB
Java

package org.gcube.accounting.couchdb.query;
import java.util.HashMap;
import java.util.Map;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*/
public class CouchDBQueryPluginTest {
/**
* Logger
*/
private static Logger logger = LoggerFactory.getLogger(CouchDBQueryPluginTest.class);
@Before
public void before() throws Exception{
SecurityTokenProvider.instance.set(TestUtility.TOKEN);
}
@After
public void after(){
SecurityTokenProvider.instance.reset();
}
@Test
public void testLaunch() throws Exception {
logger.debug("Starting to test launch");
Map<String, Object> inputs = new HashMap<String, Object>();
inputs.put(CouchDBQueryPlugin.DELAY_MILLIS, 1000*10); // Delay 10 sec
CouchDBQueryPlugin couchDBQueryPlugin = new CouchDBQueryPlugin(null);
couchDBQueryPlugin.launch(inputs);
logger.debug("-------------- launch test finished");
}
}