File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
firebase-perf/src/test/java/com/google/firebase/perf/transport Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1119,7 +1119,7 @@ public void logTraceMetric_globalCustomAttributesAreAdded() {
1119
1119
}
1120
1120
1121
1121
@Test
1122
- public void logNetworkMetric_globalCustomAttributesAreNotAdded () {
1122
+ public void logNetworkMetric_globalCustomAttributesAreAdded () {
1123
1123
FirebasePerformance.getInstance().putAttribute("test_key1", "test_value1");
1124
1124
FirebasePerformance.getInstance().putAttribute("test_key2", "test_value2");
1125
1125
NetworkRequestMetric validNetworkRequest = createValidNetworkRequestMetric();
@@ -1131,7 +1131,12 @@ public void logNetworkMetric_globalCustomAttributesAreNotAdded() {
1131
1131
assertThat(loggedPerfMetric.getNetworkRequestMetric()).isEqualTo(validNetworkRequest);
1132
1132
validateApplicationInfo(
1133
1133
loggedPerfMetric, ApplicationProcessState.APPLICATION_PROCESS_STATE_UNKNOWN);
1134
- assertThat(loggedPerfMetric.getApplicationInfo().getCustomAttributesCount()).isEqualTo(0);
1134
+
1135
+ Map<String, String> globalCustomAttributes =
1136
+ loggedPerfMetric.getApplicationInfo().getCustomAttributesMap();
1137
+ assertThat(globalCustomAttributes).hasSize(2);
1138
+ assertThat(globalCustomAttributes).containsEntry("test_key1", "test_value1");
1139
+ assertThat(globalCustomAttributes).containsEntry("test_key2", "test_value2");
1135
1140
}
1136
1141
1137
1142
@Test
You can’t perform that action at this time.
0 commit comments