You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Felix Knecht <fe...@apache.org> on 2010/02/22 15:26:00 UTC
Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sorry and thanks for fixing. I only run the shared project tests :(
Felix
On 22.02.2010 15:20, elecharny@apache.org wrote:
> Author: elecharny
> Date: Mon Feb 22 14:20:55 2010
> New Revision: 912579
>
> URL: http://svn.apache.org/viewvc?rev=912579&view=rev
> Log:
> Fixed failing tests due to i18n transition
>
> Modified:
> directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
>
> Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
> URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java?rev=912579&r1=912578&r2=912579&view=diff
> ==============================================================================
> --- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java (original)
> +++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java Mon Feb 22 14:20:55 2010
> @@ -189,7 +189,7 @@
> }
> catch ( InvalidNameException ine )
> {
> - assertEquals( "No more characters available at position 5", ine.getMessage() );
> + assertEquals( "ERR_04201 No more characters available at position 5", ine.getMessage() );
> }
> catch ( NamingException ne )
> {
> @@ -228,7 +228,7 @@
> }
> catch ( LdapAuthenticationException lae )
> {
> - assertEquals( "ERR_229 Cannot authenticate user uid=unknown,ou=system", lae.getMessage() );
> + assertEquals( "ERR_229 (uid=unknown,ou=system)", lae.getMessage() );
> }
> catch ( NamingException ne )
> {
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkuCk/gACgkQ2lZVCB08qHHlxgCeIG0mv/7RgHB0wvnSGoqcQSB1
EjcAoNxYs9uUwMZG3uuwH5htJ4KvJz4e
=pS8/
-----END PGP SIGNATURE-----
Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 2/22/10 3:26 PM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sorry and thanks for fixing. I only run the shared project tests :(
>
Np.
Strange enough, I don't get the same result on Mac and on Linux. On Mac,
the assert is like :
assertEquals( "ERR_229 (uid=unknown,ou=system)",
lae.getMessage() );
and pass, but on linux, I get an error :
org.junit.ComparisonFailure: expected:<ERR_229
[(uid=unknown,ou=system)]> but was:<ERR_229 [Cannot authenticate user
uid=unknown,ou=system]>
Why is the message different depending on the machine the test is run ?
(we can workaround the test of course, but I want to understand what's
going on :)--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com
Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Emmanuel, Felix,
I'm also having issues with the tests in Eclipse.
I also get a different result when running the tests from maven in command line and from Eclipse on the project 'i18n'.
This only occurs if I run all the tests at once in Eclipse, selecting the 'org.apache.directory.server.i18n' package and hitting 'Run'.
When I run each test individually, everything is fine.
Here's one of the errors I get:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
org.junit.ComparisonFailure: expected:<ERR_1 [This is erro]r 1> but was:<ERR_1 [Das ist Fehle]r 1>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at org.apache.directory.server.i18n.UnknownLanguageTest.testErrorTranslationUnknownLocale(UnknownLanguageTest.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
It seems to me that Eclipse is sharing the same I18n object between the various test classes when tests are run as a whole in Eclipse.
I spent some time debugging it and, when we arrive in the 'UnknownLanguageTest' test class, the bundles of I18n class are already initialized with a default locale set to German (which I believe has been set in the first test class run, 'GermanLanguageTest').
I'll keep you posted when I know more about that.
Regards,
Pierre-Arnaud
On 22 févr. 2010, at 16:22, Emmanuel Lecharny wrote:
> Ok, we have some issue when running tests in eclipse. For instance, the core-inteh operations/bind/SimpleITTest.java :
> it takes the wrong errors.properties file (using the one in I18n/test instead of I18n/main), and has this property file just contains data used for i18n tests, we get a different error message.
>
> This is annoying ...
>
>
> On 2/22/10 3:26 PM, Felix Knecht wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Sorry and thanks for fixing. I only run the shared project tests :(
>>
>> Felix
>>
>> On 22.02.2010 15:20, elecharny@apache.org wrote:
>>
>>> Author: elecharny
>>> Date: Mon Feb 22 14:20:55 2010
>>> New Revision: 912579
>>>
>>> URL: http://svn.apache.org/viewvc?rev=912579&view=rev
>>> Log:
>>> Fixed failing tests due to i18n transition
>>>
>>> Modified:
>>> directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
>>>
>>> Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
>>> URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java?rev=912579&r1=912578&r2=912579&view=diff
>>> ==============================================================================
>>> --- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java (original)
>>> +++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java Mon Feb 22 14:20:55 2010
>>> @@ -189,7 +189,7 @@
>>> }
>>> catch ( InvalidNameException ine )
>>> {
>>> - assertEquals( "No more characters available at position 5", ine.getMessage() );
>>> + assertEquals( "ERR_04201 No more characters available at position 5", ine.getMessage() );
>>> }
>>> catch ( NamingException ne )
>>> {
>>> @@ -228,7 +228,7 @@
>>> }
>>> catch ( LdapAuthenticationException lae )
>>> {
>>> - assertEquals( "ERR_229 Cannot authenticate user uid=unknown,ou=system", lae.getMessage() );
>>> + assertEquals( "ERR_229 (uid=unknown,ou=system)", lae.getMessage() );
>>> }
>>> catch ( NamingException ne )
>>> {
>>>
>>>
>>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.14 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAkuCk/gACgkQ2lZVCB08qHHlxgCeIG0mv/7RgHB0wvnSGoqcQSB1
>> EjcAoNxYs9uUwMZG3uuwH5htJ4KvJz4e
>> =pS8/
>> -----END PGP SIGNATURE-----
>>
>>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.nextury.com
>
>
Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
Posted by Emmanuel Lecharny <el...@gmail.com>.
On 3/6/10 8:44 AM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/05/10 15:06, Felix Knecht wrote:
>
>> On 02/22/10 16:22, Emmanuel Lecharny wrote:
>>
>>> Ok, we have some issue when running tests in eclipse. For instance, the
>>> core-inteh operations/bind/SimpleITTest.java :
>>> it takes the wrong errors.properties file (using the one in I18n/test
>>> instead of I18n/main), and has this property file just contains data
>>> used for i18n tests, we get a different error message.
>>>
>>
>>> This is annoying ...
>>>
> After some more thinking about this:
> What about only testing the error code "ERR_xxx" prefixing the error
> message? It should be the same no matter which language is used ?
>
doh ! Why didn't I thougt about this solution ? Of course, this is the
way to test the error !
--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com
Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
Posted by Felix Knecht <fe...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/05/10 15:06, Felix Knecht wrote:
> On 02/22/10 16:22, Emmanuel Lecharny wrote:
>> Ok, we have some issue when running tests in eclipse. For instance, the
>> core-inteh operations/bind/SimpleITTest.java :
>> it takes the wrong errors.properties file (using the one in I18n/test
>> instead of I18n/main), and has this property file just contains data
>> used for i18n tests, we get a different error message.
>
>> This is annoying ...
After some more thinking about this:
What about only testing the error code "ERR_xxx" prefixing the error
message? It should be the same no matter which language is used ?
Felix
>
> We could remove the tests as
> - they are working
> - not of big need to test
>
> Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkuSB8sACgkQ2lZVCB08qHH+9QCfb6jF0r1sH72q9pKPm/JUy5NQ
DfIAoPAWUlLYi1Hmu5u8GDrlD5NcG+rW
=2/9t
-----END PGP SIGNATURE-----
Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
Posted by Felix Knecht <fe...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/22/10 16:22, Emmanuel Lecharny wrote:
> Ok, we have some issue when running tests in eclipse. For instance, the
> core-inteh operations/bind/SimpleITTest.java :
> it takes the wrong errors.properties file (using the one in I18n/test
> instead of I18n/main), and has this property file just contains data
> used for i18n tests, we get a different error message.
>
> This is annoying ...
We could remove the tests as
- - they are working
- - not of big need to test
Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkuRD/MACgkQ2lZVCB08qHH7DQCgj5zseInNoI5g6UhouWxowgJc
nX8Anjz5Cb1quADfUuGSTSd+rL1unk6B
=dVty
-----END PGP SIGNATURE-----
Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
Posted by Emmanuel Lecharny <el...@gmail.com>.
Ok, we have some issue when running tests in eclipse. For instance, the
core-inteh operations/bind/SimpleITTest.java :
it takes the wrong errors.properties file (using the one in I18n/test
instead of I18n/main), and has this property file just contains data
used for i18n tests, we get a different error message.
This is annoying ...
On 2/22/10 3:26 PM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sorry and thanks for fixing. I only run the shared project tests :(
>
> Felix
>
> On 22.02.2010 15:20, elecharny@apache.org wrote:
>
>> Author: elecharny
>> Date: Mon Feb 22 14:20:55 2010
>> New Revision: 912579
>>
>> URL: http://svn.apache.org/viewvc?rev=912579&view=rev
>> Log:
>> Fixed failing tests due to i18n transition
>>
>> Modified:
>> directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
>>
>> Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
>> URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java?rev=912579&r1=912578&r2=912579&view=diff
>> ==============================================================================
>> --- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java (original)
>> +++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java Mon Feb 22 14:20:55 2010
>> @@ -189,7 +189,7 @@
>> }
>> catch ( InvalidNameException ine )
>> {
>> - assertEquals( "No more characters available at position 5", ine.getMessage() );
>> + assertEquals( "ERR_04201 No more characters available at position 5", ine.getMessage() );
>> }
>> catch ( NamingException ne )
>> {
>> @@ -228,7 +228,7 @@
>> }
>> catch ( LdapAuthenticationException lae )
>> {
>> - assertEquals( "ERR_229 Cannot authenticate user uid=unknown,ou=system", lae.getMessage() );
>> + assertEquals( "ERR_229 (uid=unknown,ou=system)", lae.getMessage() );
>> }
>> catch ( NamingException ne )
>> {
>>
>>
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.14 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkuCk/gACgkQ2lZVCB08qHHlxgCeIG0mv/7RgHB0wvnSGoqcQSB1
> EjcAoNxYs9uUwMZG3uuwH5htJ4KvJz4e
> =pS8/
> -----END PGP SIGNATURE-----
>
>
--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com