ср, 10 авг. 2022 г. в 13:25, Han Li <aooo...@gmail.com>:
>
> Mark,
>
> Can I make a suggestion related to the ant build script. Can we add two 
> properties to set the values of ` -Duser.language` and `-Duser.country`, 
> because in the course of my testing I found that some of the unit test 
> assertions are in English, but there may be cases where the values are 
> converted by sm, e.g. Chinese.
> Just like this:
>    Assert.assertEquals("ok”,x);
> The variable x becomes "好" after passing through the StringManager.
>
> So this makes it a bit inconvenient for non-English speaking developers to 
> test. I avoid this problem by adding a statement to build.xml each time I run 
> a test.
> <jvmarg value="-Duser.language=en"/>
> <jvmarg value="-Duser.country=US"/>
>
> So I was wondering if we could dynamically set these two values via 
> build.properties
>
> Thanks,
>
> Han

I think that such tests are just broken and require fixing.

E.g. get an instance of StringManager and read the expected message from it.


Maybe we can add -Duser.language=zh -Duser.country=CN to ANT_OPTS in
some Buildbot configurations, to be able to detect such tests.

(Though
- It would be hard to read their logs, if anything happens. As the
logs will be in Chinese.

- Such an approach assumes that there is something to detect.  A
broken test is only broken for languages where translation exists and
differs from the default.)

Best regards,
Konstantin Kolinko

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

Reply via email to