Re: How to test a NetBeans Platform app? NbTestCase classpath woes

2019-05-09 Thread Emilian Bold
Indeed, the java.class.path is much larger for tests.

--emi

On Fri, Apr 26, 2019 at 10:24 PM Emilian Bold  wrote:
>
> One trick I learned is that .clusters() is applied only to the cluster
> folder name, not the full path.
>
> This was kinda obvious really, but since the current suite has the
> cluster under build/cluster I assumed it might be the full path. But
> no, your regexp has to also match 'cluster'.
>
> This doesn't solve the classpath problem mentioned initially...
>
> --emi
>
> On Thu, Apr 25, 2019 at 11:16 AM Emilian Bold  wrote:
> >
> > Hello,
> >
> > I'm trying to introduce NbTestCase into a large existing app and I'm
> > getting all kinds of what seem to be class-loader/classpath problems.
> >
> > The whole NbModuleSuite.Configuration is quite limited in what it does
> > and I can't seem to find any combination of settings that starts the
> > application properly.
> >
> > The code uses some libraries that read "JAI (Java Advanced Imaging)
> > registry files" inside META-INF/registryFile.jai and also some
> > java.util.ServiceLoader.
> >
> > It seems that no matter how I run the configuration:
> > * with hand-picked clusters or just .clusters(".*") or
> > * with hand-picked enableModules or just ".*" or
> > * enableClasspathModules(false)
> >
> > ... I get some duplicated entries in the classpath.
> >
> > Then I get a warning like:
> >
> > > Error while parsing JAI registry file 
> > > "file:/home/nasa/DSCOVR/SecretLunarBase/release/modules/ext/some.jar"
> >
> > But that release/modules/ext folder is *not* supposed to be in the
> > classpath as I already have the same JAR in the suite build/cluster/
> > folder (which folder is shown at app startup under `Installation=`).
> >
> > So, is there a way to configure NbTestCase so 'it just works'? I don't
> > want any fewer modules, I just want the application to start normally,
> > then execute
> > my test, without breaking the classpath in ways that are
> > test-specific.
> >
> > Regards,
> >
> >
> > --emi

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Re: How to test a NetBeans Platform app? NbTestCase classpath woes

2019-04-26 Thread Emilian Bold
One trick I learned is that .clusters() is applied only to the cluster
folder name, not the full path.

This was kinda obvious really, but since the current suite has the
cluster under build/cluster I assumed it might be the full path. But
no, your regexp has to also match 'cluster'.

This doesn't solve the classpath problem mentioned initially...

--emi

On Thu, Apr 25, 2019 at 11:16 AM Emilian Bold  wrote:
>
> Hello,
>
> I'm trying to introduce NbTestCase into a large existing app and I'm
> getting all kinds of what seem to be class-loader/classpath problems.
>
> The whole NbModuleSuite.Configuration is quite limited in what it does
> and I can't seem to find any combination of settings that starts the
> application properly.
>
> The code uses some libraries that read "JAI (Java Advanced Imaging)
> registry files" inside META-INF/registryFile.jai and also some
> java.util.ServiceLoader.
>
> It seems that no matter how I run the configuration:
> * with hand-picked clusters or just .clusters(".*") or
> * with hand-picked enableModules or just ".*" or
> * enableClasspathModules(false)
>
> ... I get some duplicated entries in the classpath.
>
> Then I get a warning like:
>
> > Error while parsing JAI registry file 
> > "file:/home/nasa/DSCOVR/SecretLunarBase/release/modules/ext/some.jar"
>
> But that release/modules/ext folder is *not* supposed to be in the
> classpath as I already have the same JAR in the suite build/cluster/
> folder (which folder is shown at app startup under `Installation=`).
>
> So, is there a way to configure NbTestCase so 'it just works'? I don't
> want any fewer modules, I just want the application to start normally,
> then execute
> my test, without breaking the classpath in ways that are
> test-specific.
>
> Regards,
>
>
> --emi

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



How to test a NetBeans Platform app? NbTestCase classpath woes

2019-04-25 Thread Emilian Bold
Hello,

I'm trying to introduce NbTestCase into a large existing app and I'm
getting all kinds of what seem to be class-loader/classpath problems.

The whole NbModuleSuite.Configuration is quite limited in what it does
and I can't seem to find any combination of settings that starts the
application properly.

The code uses some libraries that read "JAI (Java Advanced Imaging)
registry files" inside META-INF/registryFile.jai and also some
java.util.ServiceLoader.

It seems that no matter how I run the configuration:
* with hand-picked clusters or just .clusters(".*") or
* with hand-picked enableModules or just ".*" or
* enableClasspathModules(false)

... I get some duplicated entries in the classpath.

Then I get a warning like:

> Error while parsing JAI registry file 
> "file:/home/nasa/DSCOVR/SecretLunarBase/release/modules/ext/some.jar"

But that release/modules/ext folder is *not* supposed to be in the
classpath as I already have the same JAR in the suite build/cluster/
folder (which folder is shown at app startup under `Installation=`).

So, is there a way to configure NbTestCase so 'it just works'? I don't
want any fewer modules, I just want the application to start normally,
then execute
my test, without breaking the classpath in ways that are
test-specific.

Regards,


--emi

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists