directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot ...@marcelot.net>
Subject Re: svn commit: r912579 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
Date Mon, 22 Feb 2010 16:03:59 GMT
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
> 
> 


Mime
View raw message