test: Remove icu cleanup hack
libjavacore now cleans up ICU itself properly in JNI_OnUnload,
removing the need for this hack in a test.
Bug: 31469648
Change-Id: Ic415edb20c3a64472f4dc4e892af01ad94cf2fce
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index dba0a81..531b863 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -409,15 +409,6 @@
TearDownAndroidData(android_data_, true);
dalvik_cache_.clear();
- // icu4c has a fixed 10-element array "gCommonICUDataArray".
- // If we run > 10 tests, we fill that array and u_setCommonData fails.
- // There's a function to clear the array, but it's not public...
- typedef void (*IcuCleanupFn)();
- void* sym = dlsym(RTLD_DEFAULT, "u_cleanup_" U_ICU_VERSION_SHORT);
- CHECK(sym != nullptr) << dlerror();
- IcuCleanupFn icu_cleanup_fn = reinterpret_cast<IcuCleanupFn>(sym);
- (*icu_cleanup_fn)();
-
Runtime::Current()->GetHeap()->VerifyHeap(); // Check for heap corruption after the test
}