Skip to content
Snippets Groups Projects
Commit 479dbbd9 authored by Patrick Rohr's avatar Patrick Rohr Committed by Maciej Żenczykowski
Browse files

Revert "RateLimitTest: temporarily dump ConnectivityThread if setUp fails"

This reverts commit cbe17558.

Reason for revert: we found the culprit for the flakiness and b/272147742 is fixed.

Change-Id: I672c42bb57184393588666b6196f3a316f8c99c7
parent 6aec2583
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,6 @@ import android.content.Context;
import android.icu.text.MessageFormat;
import android.net.ConnectivityManager;
import android.net.ConnectivitySettingsManager;
import android.net.ConnectivityThread;
import android.net.InetAddresses;
import android.net.IpPrefix;
import android.net.LinkAddress;
......@@ -190,19 +189,7 @@ public class RateLimitTest {
// whatever happens, don't leave the device in rate limited state.
ConnectivitySettingsManager.setIngressRateLimitInBytesPerSecond(mContext, -1);
}
if (mSocket == null) {
// HACK(b/272147742): dump ConnectivityThread if test initialization failed.
final StackTraceElement[] elements = ConnectivityThread.get().getStackTrace();
final StringBuilder sb = new StringBuilder();
// Skip first element as it includes the invocation of getStackTrace()
for (int i = 1; i < elements.length; i++) {
sb.append(elements[i]);
sb.append("\n");
}
Log.e(TAG, sb.toString());
} else {
mSocket.close();
}
if (mSocket != null) mSocket.close();
if (mNetworkAgent != null) mNetworkAgent.unregister();
if (mTunInterface != null) mTunInterface.getFileDescriptor().close();
if (mCm != null) mCm.unregisterNetworkCallback(mNetworkCallback);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment