Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ func TestAccountzRecordPayloadTruncation(t *testing.T) {
helpers.GnmiCLIConfig(t, dut, communitySetCLIConfig)
}

startTime := time.Now()

// Get the current time from the router via gNMI to avoid clock skew issues.
startTime := helpers.GetRouterTime(t, dut)
acctzClient := dut.RawAPIs().GNSI(t).AcctzStream()
acctzSubClient, err := acctzClient.RecordSubscribe(context.Background(), &acctzpb.RecordRequest{
Timestamp: timestamppb.New(startTime),
Timestamp: &timestamppb.Timestamp{
Seconds: startTime.Unix(),
Nanos: 0,
},
})
if err != nil {
t.Fatalf("Failed to subscribe to acctz records: %v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

"github.com/openconfig/featureprofiles/internal/deviations"
"github.com/openconfig/featureprofiles/internal/fptest"
"github.com/openconfig/featureprofiles/internal/helpers"
"github.com/openconfig/featureprofiles/internal/security/acctz"
acctzpb "github.com/openconfig/gnsi/acctz"
"github.com/openconfig/ondatra"
Expand Down Expand Up @@ -53,8 +54,8 @@ func TestAccountzRecordSubscribeFull(t *testing.T) {
} else {
acctz.SetupUsers(t, dut, false)
}
startTime := time.Now()

// Get the current time from the router via gNMI to avoid clock skew issues.
startTime := helpers.GetRouterTime(t, dut)
// Get gNSI record subscribe client.
requestTimestamp := &timestamppb.Timestamp{
Seconds: startTime.Unix(),
Expand Down
Loading