On Tuesday, April 7, 2020 6:39:17 PM CEST Massimo Bono wrote:
> Hi all,

Hi Massimo,

> I'm exploring the pax-exam project because* I want to change the location
> of the pax-exam probe generated* (location in the file system and possibly
> its name): I'm using a karaf container to actually test and in that project
> in order to configure the probe itself I need to specify a method annotated
> with "@ProbeBuilder". By looking where the annotation "@ProbeBuilder" was
> actually used I discovered the methods `overwriteWithUserDefinition` and
> `createProbeBuilder` in `TestProbeBuilder` which , apparently, creates a
> probe implementation from a template (i.e., system.createProbe()). Looking
> at the method interface it seems that I just need to change the tem dir via
> the method `setTempDir`.
> 
> However, there is a problem: the associated method `getTempDir`,
> technically used to retrieve such a temp directory, is not used in the
> project at all (or at least, a search in my IDE gave no usage result).
> 
> Since I couldn't find usages of `getTempDir` method, I turn my attention on
> `system.createProbe()`. The only implementation I found was in
> `ReactorManager.createProbeBuilder`.
> Here I noticed that the `tempDir` field of the pax-probe is populated by a
> temporary folder via the line `cache = createTemp(new
> File(work.getWorkingDirectory()));` whereas the `store` variable may
> represents an abstract storage location. Inspecting further the standard
> implementation of `TestProbeBuilderImpl.build()` seems to reveal that such
> a variable is responsible to decide where the probe is actually stored.
> 
> In particular, it seems that  the only implementation of `Store`,
> `TemporaryStore`, actually creates the probe in temp file via
> `createTempFile` and only then transfer it in a given location
> `TemporaryStore.getLocation()`. So changing the return value of such a
> method should do the trick.
> 
> 
> My questions are:
>  - what is the real purpose of `getTempDir` method in `TestProbeBuilder`?
> Is is really useless or it has an implicit need?
>  - I've noticed that both the filename of such a probe and its symbolic
> name are hardcoded? Do you know any location in pax-exam (or karaf) where
> such hardcoded names are used? I ask this because if I can, I would like to
> change them :)
>  - Is it indeed safe to change the instance of `Store` with another that
> allows me to change the actual probe-location?
>  - If I want to add some javadoc documentation in some classes (like the
> totally undocumented `TestProbeBuilder`), what are the contribution rules?
> Can you give me a link to them so I can read them? On pax-exam site I
> couldn't find them, but maybe I'm just stupid :D
> 
> Thanks for any kind reply

Why do you want to access the probe as file?
You can change the symbolic name via TestProbeBuilder.

Regards,
O.




-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/2869386.BpcU5DQJyk%40madness.front.ruhr.

Reply via email to