Skip to content

Commit

Permalink
test(bigtable): Pass reverse flag from proxy to library (#11395)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhshkh authored Jan 8, 2025
1 parent 9e7efea commit 7abfaaa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bigtable/internal/testproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,12 @@ func (s *goTestProxyServer) ReadRows(ctx context.Context, req *pb.ReadRowsReques
var c int32
var rowsPb []*btpb.Row
lim := req.GetCancelAfterRows()

reversed := req.GetRequest().GetReversed()
opts := []bigtable.ReadOption{}
if reversed {
opts = append(opts, bigtable.ReverseScan())
}
err = t.ReadRows(ctx, rs, func(r bigtable.Row) bool {

c++
Expand All @@ -585,7 +591,7 @@ func (s *goTestProxyServer) ReadRows(ctx context.Context, req *pb.ReadRowsReques
}
rowsPb = append(rowsPb, rpb)
return true
})
}, opts...)

res := &pb.RowsResult{
Status: &statpb.Status{
Expand Down

0 comments on commit 7abfaaa

Please sign in to comment.