Connectivity metrics: add transports to validation probes
This patch adds transports info to ValidationProbeEvent and migrates netId logging for this event to the topt-level netId field in ConnectivityMetricsEvent. Test: modified unit tests. $ runtest frameworks-net passes Bug: 3490169 Change-Id: Ibf51049ba8901ae5ca4ea86e2f500944a4738b5c
This commit is contained in:
@@ -402,7 +402,6 @@ public class IpConnectivityEventBuilderTest extends TestCase {
|
||||
public void testValidationProbeEventSerialization() {
|
||||
ConnectivityMetricsEvent ev = describeIpEvent(
|
||||
aType(ValidationProbeEvent.class),
|
||||
anInt(120),
|
||||
aLong(40730),
|
||||
anInt(ValidationProbeEvent.PROBE_HTTP),
|
||||
anInt(204));
|
||||
@@ -417,9 +416,6 @@ public class IpConnectivityEventBuilderTest extends TestCase {
|
||||
" transports: 0",
|
||||
" validation_probe_event <",
|
||||
" latency_ms: 40730",
|
||||
" network_id <",
|
||||
" network_id: 120",
|
||||
" >",
|
||||
" probe_result: 204",
|
||||
" probe_type: 1",
|
||||
" >",
|
||||
|
||||
@@ -153,12 +153,18 @@ public class IpConnectivityMetricsTest extends TestCase {
|
||||
apfStats.programUpdatesAll = 7;
|
||||
apfStats.programUpdatesAllowingMulticast = 3;
|
||||
apfStats.maxProgramSize = 2048;
|
||||
|
||||
ValidationProbeEvent validationEv = new ValidationProbeEvent();
|
||||
validationEv.durationMs = 40730;
|
||||
validationEv.probeType = ValidationProbeEvent.PROBE_HTTP;
|
||||
validationEv.returnCode = 204;
|
||||
|
||||
Parcelable[] events = {
|
||||
new IpReachabilityEvent(IpReachabilityEvent.NUD_FAILED),
|
||||
new DhcpClientEvent("SomeState", 192),
|
||||
new DefaultNetworkEvent(102, new int[]{1,2,3}, 101, true, false),
|
||||
new IpManagerEvent(IpManagerEvent.PROVISIONING_OK, 5678),
|
||||
new ValidationProbeEvent(120, 40730, ValidationProbeEvent.PROBE_HTTP, 204),
|
||||
validationEv,
|
||||
apfStats,
|
||||
new RaEvent(2000, 400, 300, -1, 1000, -1)
|
||||
};
|
||||
@@ -235,9 +241,6 @@ public class IpConnectivityMetricsTest extends TestCase {
|
||||
" transports: 0",
|
||||
" validation_probe_event <",
|
||||
" latency_ms: 40730",
|
||||
" network_id <",
|
||||
" network_id: 120",
|
||||
" >",
|
||||
" probe_result: 204",
|
||||
" probe_type: 1",
|
||||
" >",
|
||||
|
||||
Reference in New Issue
Block a user