From ecf844b39473fe21acaa1f832d244a4cc4c9f811 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Mon, 14 Mar 2022 11:28:22 -0500 Subject: SONAR-16097 Add plugin cache to the Sensor API --- .../org/sonar/scanner/protocol/output/ScannerReportReaderTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol') diff --git a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java index 58333d108cf..1269c63c540 100644 --- a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java +++ b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java @@ -35,7 +35,8 @@ import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.sonar.core.util.CloseableIterator; import org.sonar.core.util.Protobuf; -import org.sonar.scanner.protocol.internal.ScannerInternal.PluginCacheMsg; +import org.sonar.scanner.protocol.internal.ScannerInternal; +import org.sonar.scanner.protocol.internal.ScannerInternal.AnalysisCacheMsg; import org.sonar.scanner.protocol.output.ScannerReport.Measure.StringValue; import org.sonar.scanner.protocol.output.ScannerReport.SyntaxHighlightingRule.HighlightingType; @@ -214,13 +215,13 @@ public class ScannerReportReaderTest { @Test public void read_plugin_cache() throws IOException { ScannerReportWriter writer = new ScannerReportWriter(dir); - writer.writePluginCache(PluginCacheMsg.newBuilder() + writer.writeAnalysisCache(ScannerInternal.AnalysisCacheMsg.newBuilder() .putMap("key", ByteString.copyFrom("data", UTF_8)) .build()); ScannerReportReader reader = new ScannerReportReader(dir); - PluginCacheMsg cache = Protobuf.read(new GZIPInputStream(reader.getPluginCache()), PluginCacheMsg.parser()); + AnalysisCacheMsg cache = Protobuf.read(new GZIPInputStream(reader.getPluginCache()), ScannerInternal.AnalysisCacheMsg.parser()); assertThat(cache.getMapMap()).containsOnly(new AbstractMap.SimpleEntry<>("key", ByteString.copyFrom("data", UTF_8))); } -- cgit v1.2.3