Skip to content

Commit cafafe4

Browse files
bpcreechBen Creechgcf-owl-bot[bot]
authored
fix: Fix flakiness in JSON test (#1006)
* fix: Fix flakiness in JSON test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Ben Creech <bpcreech@google.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 49bf5b4 commit cafafe4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

google-cloud-logging/src/test/java/com/google/cloud/logging/LogEntryTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.google.cloud.logging.Payload.ProtoPayload;
2626
import com.google.cloud.logging.Payload.StringPayload;
2727
import com.google.common.collect.ImmutableMap;
28+
import com.google.gson.JsonParser;
2829
import com.google.protobuf.Any;
2930
import com.google.protobuf.Empty;
3031
import java.time.Instant;
@@ -380,7 +381,10 @@ private void compareLogEntry(LogEntry expected, LogEntry value, Boolean extraVal
380381
public void testStructureLogPresentations() {
381382
for (int i = 0; i < TEST_LOG_ENTRIES.length; i++) {
382383
String structured_log = TEST_LOG_ENTRIES[i].toStructuredJsonString();
383-
assertEquals(EXPECTED_STRUCTURED_LOGS[i], structured_log);
384+
385+
assertEquals(
386+
JsonParser.parseString(EXPECTED_STRUCTURED_LOGS[i]),
387+
JsonParser.parseString(structured_log));
384388
}
385389
}
386390

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy