Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevents duplicate log lines from being replayed. closes #3378 #3388

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Feb 25, 2021

No description provided.

},
},
}
require.Equal(t, expected, result.resps[0].Streams)
Copy link
Collaborator

@kavirajk kavirajk Feb 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: better to add length check before this equality check.?

Rationale:

  1. Assert errors looks better than panic :) (in case of failure or result.resps is empty)
  2. Plus checking for length == 1, make sure there are no duplicates more precisely? Now there can be resp[1] right? we never know.
    e.g
Suggested change
require.Equal(t, expected, result.resps[0].Streams)
require.Equal(t, len(result.reps), 1)
require.Equal(t, expected, result.resps[0].Streams)

Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kavirajk your feedback is good but I would like to get this merged and into our internal release so I'm going to merge as is!

@slim-bean slim-bean merged commit 7613197 into grafana:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants