Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: logdog/server/collector/utils_test.go

Issue 2435883002: LogDog: Fix archival Get/Tail implementations. (Closed)
Patch Set: LogDog: Fix archival Get/Tail implementations. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: logdog/server/collector/utils_test.go
diff --git a/logdog/server/collector/utils_test.go b/logdog/server/collector/utils_test.go
index 73d1a7cf808362f5008c786e67597ec44843c122..3cb67817faf3204fccad7030eb178a7b8c553d62 100644
--- a/logdog/server/collector/utils_test.go
+++ b/logdog/server/collector/utils_test.go
@@ -14,7 +14,6 @@ import (
"strings"
"sync"
- "github.com/golang/protobuf/proto"
"github.com/luci/luci-go/common/clock"
"github.com/luci/luci-go/common/config"
"github.com/luci/luci-go/common/proto/google"
@@ -23,6 +22,7 @@ import (
"github.com/luci/luci-go/logdog/common/storage"
"github.com/luci/luci-go/logdog/common/types"
cc "github.com/luci/luci-go/logdog/server/collector/coordinator"
+
"golang.org/x/net/context"
)
@@ -301,12 +301,12 @@ func shouldHaveStoredStream(actual interface{}, expected ...interface{}) string
entries := make(map[int]*logpb.LogEntry)
var ierr error
- err := st.Get(req, func(idx types.MessageIndex, d []byte) bool {
- le := logpb.LogEntry{}
- if ierr = proto.Unmarshal(d, &le); ierr != nil {
+ err := st.Get(req, func(e *storage.Entry) bool {
+ var le *logpb.LogEntry
+ if le, ierr = e.GetLogEntry(); ierr != nil {
return false
}
- entries[int(idx)] = &le
+ entries[int(le.StreamIndex)] = le
return true
})
if ierr != nil {
« logdog/common/storage/archive/storage.go ('K') | « logdog/server/archivist/storageSource.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698