What's the type of DockerActivity.INSPECT and IMAGE_NAME? It sounds like
something goes wrong in converting either within ActivityInvoker or within
DockerActivity.

String and byte[] should work.

On 25 Jun 2016 7:11 a.m., "Nadeesh Dilanga" <[email protected]> wrote:

> Hi,
> I am trying to reuse the ActivityInvoker#invokeAsyncActivity  to my
> activity plugin unit test. And my code is as follows where I am passing
> String inputs to inspect an image. But the ActivityInvoker not passing same
> inouts to my DockerActivity.
> Ex: In ActivityInvoker > referenceService.register(getNameForObject)
> returns  "t2:error//testNS?test0/0" after converting my input
> "hello-world". I debug the code, it identifies my input as a
> ExternalReferenceSPI and that seems to be what converting my value to
> "t2:error//testNS?test0/0"".
>
> Any idea why ? If this is not good to reuse for my case, shall I directly
> invoke the activity class ?
>
> DockerActivity activity = new DockerActivity(containerConfiguration);
>       activity.configure(activityConfiguration);
>
> Map<String,Object> inputs = new HashMap<String,Object>();
>       inputs.put(DockerActivity.ACTION, DockerActivity.INSPECT);
>       inputs.put(DockerActivity.IN_IMAGE_NAME, IMAGE_NAME);
>
> Map<String, Class<?>> expectedOutputs = new HashMap<String, Class<?>>();
> expectedOutputs.put("response_body", T2Reference.class);
>
> Map<String,Object> outputs =
> ActivityInvoker.invokeAsyncActivity(activity, inputs,
> expectedOutputs);
>       System.out.println(outputs.size());
>

Reply via email to