Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1af06a6e authored by Hugo Benichi's avatar Hugo Benichi
Browse files

IP connectivity metrics: fix tests

Change 4e89a026 did not update the unit
tests checking serialization of ipconnectivity.proto protobufs.

This patch updates the tests expectations to make them pass again

Test: $ runtest frameworks-net
Bug: 34232829
Change-Id: Iccc4e1a7714c9ce1eba995dc47a2961216efc87d
parent e96cbd27
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -58,8 +58,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  default_network_event <",
                "    network_id <",
                "      network_id: 102",
@@ -89,8 +89,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  dhcp_event <",
                "    duration_ms: 192",
                "    if_name: \"wlan0\"",
@@ -112,8 +112,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  dhcp_event <",
                "    duration_ms: 0",
                "    if_name: \"wlan0\"",
@@ -137,8 +137,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  dns_lookup_batch <",
                "    event_types: 1",
                "    event_types: 1",
@@ -185,8 +185,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  ip_provisioning_event <",
                "    event_type: 1",
                "    if_name: \"wlan0\"",
@@ -208,8 +208,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  ip_reachability_event <",
                "    event_type: 512",
                "    if_name: \"wlan0\"",
@@ -231,8 +231,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  network_event <",
                "    event_type: 5",
                "    latency_ms: 20410",
@@ -258,8 +258,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  validation_probe_event <",
                "    latency_ms: 40730",
                "    network_id <",
@@ -287,8 +287,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  apf_program_event <",
                "    current_ras: 9",
                "    drop_multicast: true",
@@ -319,8 +319,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  apf_statistics <",
                "    dropped_ras: 2",
                "    duration_ms: 45000",
@@ -351,8 +351,8 @@ public class IpConnectivityEventBuilderTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 1",
                "  transport: 0",
                "  ra_event <",
                "    dnssl_lifetime: -1",
                "    prefix_preferred_lifetime: 300",
+7 −7
Original line number Diff line number Diff line
@@ -158,16 +158,16 @@ public class IpConnectivityMetricsTest extends TestCase {
        String want = joinLines(
                "dropped_events: 0",
                "events <",
                "  link_layer: 0",
                "  time_ms: 100",
                "  transport: 0",
                "  ip_reachability_event <",
                "    event_type: 512",
                "    if_name: \"wlan0\"",
                "  >",
                ">",
                "events <",
                "  link_layer: 0",
                "  time_ms: 200",
                "  transport: 0",
                "  dhcp_event <",
                "    duration_ms: 192",
                "    if_name: \"wlan0\"",
@@ -175,8 +175,8 @@ public class IpConnectivityMetricsTest extends TestCase {
                "  >",
                ">",
                "events <",
                "  link_layer: 0",
                "  time_ms: 300",
                "  transport: 0",
                "  default_network_event <",
                "    network_id <",
                "      network_id: 102",
@@ -191,8 +191,8 @@ public class IpConnectivityMetricsTest extends TestCase {
                "  >",
                ">",
                "events <",
                "  link_layer: 0",
                "  time_ms: 400",
                "  transport: 0",
                "  ip_provisioning_event <",
                "    event_type: 1",
                "    if_name: \"wlan0\"",
@@ -200,8 +200,8 @@ public class IpConnectivityMetricsTest extends TestCase {
                "  >",
                ">",
                "events <",
                "  link_layer: 0",
                "  time_ms: 500",
                "  transport: 0",
                "  validation_probe_event <",
                "    latency_ms: 40730",
                "    network_id <",
@@ -212,8 +212,8 @@ public class IpConnectivityMetricsTest extends TestCase {
                "  >",
                ">",
                "events <",
                "  link_layer: 0",
                "  time_ms: 600",
                "  transport: 0",
                "  apf_statistics <",
                "    dropped_ras: 2",
                "    duration_ms: 45000",
@@ -226,8 +226,8 @@ public class IpConnectivityMetricsTest extends TestCase {
                "  >",
                ">",
                "events <",
                "  link_layer: 0",
                "  time_ms: 700",
                "  transport: 0",
                "  ra_event <",
                "    dnssl_lifetime: -1",
                "    prefix_preferred_lifetime: 300",
+1 −1
Original line number Diff line number Diff line
@@ -213,8 +213,8 @@ public class NetdEventListenerServiceTest extends TestCase {

        IpConnectivityEvent got = events.get(0);
        String want = String.join("\n",
                "link_layer: 0",
                "time_ms: 0",
                "transport: 0",
                "connect_statistics <",
                "  connect_count: 12",
                "  errnos_counters <",