2015-02-04 12:35:43 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package org.gcube.vremanagement.executor;
|
|
|
|
|
2015-07-28 15:41:35 +02:00
|
|
|
|
|
|
|
import java.util.HashMap;
|
2015-02-04 12:35:43 +01:00
|
|
|
import java.util.Map;
|
|
|
|
|
2015-07-28 15:41:35 +02:00
|
|
|
import org.gcube.vremanagement.executor.plugin.Plugin;
|
|
|
|
import org.gcube.vremanagement.executor.pluginmanager.PluginManager;
|
2019-09-24 14:59:25 +02:00
|
|
|
import org.gcube.vremanagement.helloworld.HelloWorldPlugin;
|
2015-02-04 12:35:43 +01:00
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
/**
|
2017-02-01 17:01:15 +01:00
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
2015-02-04 12:35:43 +01:00
|
|
|
*
|
|
|
|
*/
|
2015-08-31 12:17:00 +02:00
|
|
|
public class SmartExecutorImplTest {
|
2015-02-04 12:35:43 +01:00
|
|
|
|
2015-02-06 17:01:31 +01:00
|
|
|
@Test
|
2015-08-26 18:01:58 +02:00
|
|
|
public void helloWorldTest() throws Exception{
|
2015-07-28 15:41:35 +02:00
|
|
|
Map<String, Object> inputs = new HashMap<String, Object>();
|
|
|
|
long sleepTime = 10000;
|
|
|
|
inputs.put(HelloWorldPlugin.SLEEP_TIME, sleepTime);
|
2020-09-30 11:19:49 +02:00
|
|
|
String name = (new HelloWorldPlugin()).getName();
|
2020-10-14 11:25:52 +02:00
|
|
|
PluginManager pluginManager = PluginManager.getInstance();
|
|
|
|
Plugin plugin = pluginManager.getPlugin(name);
|
2020-09-30 11:19:49 +02:00
|
|
|
plugin.launch(inputs);
|
2017-02-03 12:26:32 +01:00
|
|
|
}
|
|
|
|
|
2015-02-04 12:35:43 +01:00
|
|
|
}
|