Skip to content

Commit 47c5305

Browse files
committed
gopls/internal/regtest/bench: skip oracle didSave test
The oracle change test is in a generated package (intentionally, because this is a very large package). This causes didSave to fail, because we don't support code actions on generated files. As a result, our benchmark results are failing to be uploaded. Change-Id: Ibd0f45d85c52c3806e22e333c259a47052e8860d Reviewed-on: https://go-review.googlesource.com/c/tools/+/518215 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]> Run-TryBot: Robert Findley <[email protected]>
1 parent 053d3c4 commit 47c5305

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

gopls/internal/regtest/bench/didchange_test.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@ import (
2020
var editID int64 = time.Now().UnixNano()
2121

2222
type changeTest struct {
23-
repo string
24-
file string
23+
repo string
24+
file string
25+
canSave bool
2526
}
2627

2728
var didChangeTests = []changeTest{
28-
{"google-cloud-go", "internal/annotate.go"},
29-
{"istio", "pkg/fuzz/util.go"},
30-
{"kubernetes", "pkg/controller/lookup_cache.go"},
31-
{"kuma", "api/generic/insights.go"},
32-
{"oracle", "dataintegration/data_type.go"}, // diagnoseSave fails because this package is generated
33-
{"pkgsite", "internal/frontend/server.go"},
34-
{"starlark", "starlark/eval.go"},
35-
{"tools", "internal/lsp/cache/snapshot.go"},
29+
{"google-cloud-go", "internal/annotate.go", true},
30+
{"istio", "pkg/fuzz/util.go", true},
31+
{"kubernetes", "pkg/controller/lookup_cache.go", true},
32+
{"kuma", "api/generic/insights.go", true},
33+
{"oracle", "dataintegration/data_type.go", false}, // diagnoseSave fails because this package is generated
34+
{"pkgsite", "internal/frontend/server.go", true},
35+
{"starlark", "starlark/eval.go", true},
36+
{"tools", "internal/lsp/cache/snapshot.go", true},
3637
}
3738

3839
// BenchmarkDidChange benchmarks modifications of a single file by making
@@ -89,6 +90,9 @@ func BenchmarkDiagnoseSave(b *testing.B) {
8990
// await the resulting diagnostics pass. If save is set, the file is also saved.
9091
func runChangeDiagnosticsBenchmark(b *testing.B, test changeTest, save bool, operation string) {
9192
b.Run(test.repo, func(b *testing.B) {
93+
if !test.canSave {
94+
b.Skipf("skipping as %s cannot be saved", test.file)
95+
}
9296
sharedEnv := getRepo(b, test.repo).sharedEnv(b)
9397
config := fake.EditorConfig{
9498
Env: map[string]string{

0 commit comments

Comments
 (0)