From 5c33b9d7861cd13dc63882dd30f30d4364d4506e Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Tue, 9 Feb 2016 09:27:51 -0700 Subject: [PATCH] remove Mapper test references --- cluster/service_test.go | 17 +++++------------ services/httpd/handler_test.go | 11 ----------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/cluster/service_test.go b/cluster/service_test.go index 02d3e1b29a..85e500462e 100644 --- a/cluster/service_test.go +++ b/cluster/service_test.go @@ -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, diff --git a/services/httpd/handler_test.go b/services/httpd/handler_test.go index c17eb51c2c..8f98c71530 100644 --- a/services/httpd/handler_test.go +++ b/services/httpd/handler_test.go @@ -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)