Skip to content

Commit

Permalink
querylog: improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Nov 18, 2020
1 parent 65a8f4f commit 807b23a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/querylog/qlog_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func NewQLogFile(path string) (*QLogFile, error) {
// * It returns the position of the the line with the timestamp we were looking for
// so that when we call "ReadNext" this line was returned.
// * Depth of the search (how many times we compared timestamps).
// * If we could not find it, it returns ErrSeekNotFound
// * If we could not find it, it returns one of the errors described above.
func (q *QLogFile) Seek(timestamp int64) (int64, int, error) {
q.lock.Lock()
defer q.lock.Unlock()
Expand Down
4 changes: 2 additions & 2 deletions internal/querylog/qlog_file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func TestQLogSeek(t *testing.T) {
assert.Equal(t, 1, depth)
}

func TestQLogSeek_ErrSeekTooLate(t *testing.T) {
func TestQLogSeek_ErrTSTooLate(t *testing.T) {
testDir := prepareTestDir()
t.Cleanup(func() {
_ = os.RemoveAll(testDir)
Expand Down Expand Up @@ -318,7 +318,7 @@ func TestQLogSeek_ErrSeekTooLate(t *testing.T) {
assert.Equal(t, 2, depth)
}

func TestQLogSeek_ErrSeekTooEarly(t *testing.T) {
func TestQLogSeek_ErrTSTooEarly(t *testing.T) {
testDir := prepareTestDir()
t.Cleanup(func() {
_ = os.RemoveAll(testDir)
Expand Down

0 comments on commit 807b23a

Please sign in to comment.