Fix the DefaultThreadCurrentCulture for real.
authorRodrigo Kumpera <kumpera@gmail.com>
Fri, 4 Sep 2015 16:42:22 +0000 (12:42 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Fri, 4 Sep 2015 16:42:22 +0000 (12:42 -0400)
commitffc15afbf5465a95a947ef3cab2fa733903c5f2f
tree3f9262e25b15e0edf80d47766c55537ea9a7e914
parent2a93fc1926a04996d00fa945640f11b33e216675
Fix the DefaultThreadCurrentCulture for real.

This test is very fragile as it depends on appdomain global state.
In this case the current thread culture.

The problem with CurrentCulture is it's behavior that once set, it can't
be unset, IOW, revert to follow DefaultThreadCurrentCulture.

This meant that test ordering played a huge deal here and it took a few
tries to learn what was going on.

The way to fix this is to run the test itself from a thread that we
can ensure that won't have CurrentCulture set. This includes TP threads
or new threads.

I opted to use a TP thread as there probably is one available already
when the test runs.
mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs