Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Shreyas Rao <[email protected]>
Signed-off-by: Swapnil Mhamane <[email protected]>
  • Loading branch information
Swapnil Mhamane and shreyas-s-rao committed Sep 27, 2019
1 parent 0cdcb0c commit 045aa57
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ check:

.PHONY: test
test:
@env COVER=true .ci/unit_test
.ci/unit_test

.PHONY: perf-regression-test
perf-regression-test:
Expand Down
2 changes: 1 addition & 1 deletion pkg/snapshot/snapshotter/snapshotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (ssr *Snapshotter) TriggerDeltaSnapshot() error {
return fmt.Errorf("snapshotter is not active")
}
if ssr.config.deltaSnapshotInterval < deltaSnapshotIntervalThreshold {
return fmt.Errorf("Found delta snapshot interval %s less than 1 second. Delta snapshotting is disabled. ", ssr.config.deltaSnapshotInterval)
return fmt.Errorf("Found delta snapshot interval %s less than %v. Delta snapshotting is disabled. ", ssr.config.deltaSnapshotInterval, time.Duration(deltaSnapshotIntervalThreshold))
}
ssr.logger.Info("Triggering out of schedule delta snapshot...")
ssr.deltaSnapshotReqCh <- emptyStruct
Expand Down
4 changes: 2 additions & 2 deletions pkg/snapshot/snapshotter/snapshotter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ var _ = Describe("Snapshotter", func() {
}
})

It("should fail on triggering out-of-schedule full snapshot", func() {
It("should fail on triggering out-of-schedule delta snapshot", func() {
store, err = snapstore.GetSnapstore(&snapstore.Config{Container: path.Join(outputDir, "snapshotter_4.bkp")})
Expect(err).ShouldNot(HaveOccurred())
tlsConfig := etcdutil.NewTLSConfig(
Expand Down Expand Up @@ -339,7 +339,7 @@ var _ = Describe("Snapshotter", func() {
etcdUsername,
etcdPassword)
snapshotterConfig, err := NewSnapshotterConfig(
fmt.Sprintf("59 %d * * *", currentHour+1), // This make sure that full snapshot timer doesn't trigger full snapshot.
fmt.Sprintf("59 %d * * *", (currentHour+1)%24), // This make sure that full snapshot timer doesn't trigger full snapshot.
store,
maxBackups,
DefaultDeltaSnapMemoryLimit,
Expand Down

0 comments on commit 045aa57

Please sign in to comment.