Resolved PR comments on test files

pull/7775/head
Gustav Westling 2016-12-30 11:42:38 +01:00
parent a8343dee99
commit 26b33307ae
No known key found for this signature in database
GPG Key ID: B8DCE20EBAE2DC2F
3 changed files with 7 additions and 9 deletions

View File

@ -198,11 +198,11 @@ func NewQueryExecutor() *QueryExecutor {
var out io.Writer = &e.LogOutput
if testing.Verbose() {
io.MultiWriter(out, os.Stderr)
out = io.MultiWriter(out, os.Stderr)
}
e.QueryExecutor.WithLogger(zap.New(
zap.NewTextEncoder(),
zap.Output(os.Stderr),
zap.Output(zap.AddSync(out)),
))
return e

View File

@ -143,11 +143,6 @@ func TestQueryExecutor_Abort(t *testing.T) {
}
func TestQueryExecutor_ShowQueries(t *testing.T) {
_, err := influxql.ParseQuery(`SELECT count(value) FROM cpu`)
if err != nil {
t.Fatal(err)
}
e := NewQueryExecutor()
e.StatementExecutor = &StatementExecutor{
ExecuteStatementFn: func(stmt influxql.Statement, ctx influxql.ExecutionContext) error {

View File

@ -846,12 +846,15 @@ func ParseTSMFileName(name string) (int, int, error) {
generation, err := strconv.ParseUint(id[:idx], 10, 32)
if err != nil {
return 0, 0, err
return 0, 0, fmt.Errorf("file %s is named incorrectly", name)
}
sequence, err := strconv.ParseUint(id[idx+1:], 10, 32)
if err != nil {
return 0, 0, fmt.Errorf("file %s is named incorrectly", name)
}
return int(generation), int(sequence), err
return int(generation), int(sequence), nil
}
type KeyCursor struct {