remove Mapper test references
parent
d1b9e7048f
commit
5c33b9d786
|
@ -6,11 +6,9 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/influxdb/influxdb/cluster"
|
||||
"github.com/influxdb/influxdb/influxql"
|
||||
"github.com/influxdb/influxdb/models"
|
||||
"github.com/influxdb/influxdb/services/meta"
|
||||
"github.com/influxdb/influxdb/tcp"
|
||||
"github.com/influxdb/influxdb/tsdb"
|
||||
)
|
||||
|
||||
type metaClient struct {
|
||||
|
@ -25,12 +23,11 @@ func (m *metaClient) DataNode(nodeID uint64) (*meta.NodeInfo, error) {
|
|||
}
|
||||
|
||||
type testService struct {
|
||||
nodeID uint64
|
||||
ln net.Listener
|
||||
muxln net.Listener
|
||||
writeShardFunc func(shardID uint64, points []models.Point) error
|
||||
createShardFunc func(database, policy string, shardID uint64) error
|
||||
createMapperFunc func(shardID uint64, stmt influxql.Statement, chunkSize int) (tsdb.Mapper, error)
|
||||
nodeID uint64
|
||||
ln net.Listener
|
||||
muxln net.Listener
|
||||
writeShardFunc func(shardID uint64, points []models.Point) error
|
||||
createShardFunc func(database, policy string, shardID uint64) error
|
||||
}
|
||||
|
||||
func newTestWriteService(f func(shardID uint64, points []models.Point) error) testService {
|
||||
|
@ -71,10 +68,6 @@ func (t testService) CreateShard(database, policy string, shardID uint64) error
|
|||
return t.createShardFunc(database, policy, shardID)
|
||||
}
|
||||
|
||||
func (t testService) CreateMapper(shardID uint64, stmt influxql.Statement, chunkSize int) (tsdb.Mapper, error) {
|
||||
return t.createMapperFunc(shardID, stmt, chunkSize)
|
||||
}
|
||||
|
||||
func writeShardSuccess(shardID uint64, points []models.Point) error {
|
||||
responses <- &serviceResponse{
|
||||
shardID: shardID,
|
||||
|
|
|
@ -19,7 +19,6 @@ import (
|
|||
"github.com/influxdb/influxdb/models"
|
||||
"github.com/influxdb/influxdb/services/httpd"
|
||||
"github.com/influxdb/influxdb/services/meta"
|
||||
"github.com/influxdb/influxdb/tsdb"
|
||||
)
|
||||
|
||||
func TestBatchWrite_UnmarshalEpoch(t *testing.T) {
|
||||
|
@ -440,7 +439,6 @@ type Handler struct {
|
|||
*httpd.Handler
|
||||
MetaClient HandlerMetaStore
|
||||
QueryExecutor HandlerQueryExecutor
|
||||
TSDBStore HandlerTSDBStore
|
||||
}
|
||||
|
||||
// NewHandler returns a new instance of Handler.
|
||||
|
@ -497,15 +495,6 @@ func (e *HandlerQueryExecutor) ExecuteQuery(q *influxql.Query, db string, chunkS
|
|||
return e.ExecuteQueryFn(q, db, chunkSize, closing)
|
||||
}
|
||||
|
||||
// HandlerTSDBStore is a mock implementation of Handler.TSDBStore
|
||||
type HandlerTSDBStore struct {
|
||||
CreateMapperFn func(shardID uint64, query string, chunkSize int) (tsdb.Mapper, error)
|
||||
}
|
||||
|
||||
func (h *HandlerTSDBStore) CreateMapper(shardID uint64, query string, chunkSize int) (tsdb.Mapper, error) {
|
||||
return h.CreateMapperFn(shardID, query, chunkSize)
|
||||
}
|
||||
|
||||
// MustNewRequest returns a new HTTP request. Panic on error.
|
||||
func MustNewRequest(method, urlStr string, body io.Reader) *http.Request {
|
||||
r, err := http.NewRequest(method, urlStr, body)
|
||||
|
|
Loading…
Reference in New Issue