PhoneNumberUtil.resetInstance() should always be used instead. This omission should not be hidden by unit tests that fork.
That also makes the external version consistent with the internal one in which unit tests don't seem to be executed by default in isolated processes.
Review URL: http://codereview.appspot.com/
5341042
git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@381
ee073f10-1060-11df-b6a4-
87a95322a99c
<junit printsummary="yes">
<classpath refid="test.classpath"/>
<formatter type="xml"/>
- <batchtest fork="yes" todir="${report.dir}">
+ <batchtest fork="no" todir="${report.dir}">
<fileset dir="${test.dir}" includes="**/*Test.java"/>
</batchtest>
</junit>
</excludes>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.10</version>
+ <configuration>
+ <forkMode>never</forkMode>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
"/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting";
public ShortNumberUtilTest() {
+ PhoneNumberUtil.resetInstance();
PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(
TEST_META_DATA_FILE_PREFIX,
CountryCodeToRegionCodeMapForTesting.getCountryCodeToRegionCodeMap());