2018-10-25 23:43:11 +00:00
|
|
|
package backend_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2019-01-08 00:37:16 +00:00
|
|
|
"github.com/influxdata/influxdb/task/backend"
|
2018-10-25 23:43:11 +00:00
|
|
|
)
|
|
|
|
|
2018-12-21 17:04:08 +00:00
|
|
|
func TestParseRequestStillQueuedError(t *testing.T) {
|
|
|
|
e := backend.RequestStillQueuedError{Start: 1000, End: 2000}
|
2018-10-25 23:43:11 +00:00
|
|
|
validMsg := e.Error()
|
|
|
|
|
2018-12-21 17:04:08 +00:00
|
|
|
if err := backend.ParseRequestStillQueuedError(validMsg); err == nil || *err != e {
|
2018-10-25 23:43:11 +00:00
|
|
|
t.Fatalf("%q should have parsed to %v, but got %v", validMsg, e, err)
|
|
|
|
}
|
|
|
|
}
|