More unit tests of tagset ordering across Mappers

pull/3320/head
Philip O'Toole 2015-07-16 11:42:08 -07:00
parent c468a65bd2
commit 6131983f83
1 changed files with 8 additions and 9 deletions

View File

@ -258,8 +258,6 @@ func TestWritePointsAndExecuteTwoShardsTagSetOrdering(t *testing.T) {
return []meta.ShardGroupInfo{
{
ID: sgID,
StartTime: time.Now().Add(-4 * time.Hour),
EndTime: time.Now().Add(-3 * time.Hour),
Shards: []meta.ShardInfo{
{
ID: uint64(sID0),
@ -269,8 +267,6 @@ func TestWritePointsAndExecuteTwoShardsTagSetOrdering(t *testing.T) {
},
{
ID: sgID,
StartTime: time.Now().Add(-3 * time.Hour),
EndTime: time.Now().Add(-2 * time.Hour),
Shards: []meta.ShardInfo{
{
ID: uint64(sID1),
@ -334,9 +330,12 @@ func TestWritePointsAndExecuteTwoShardsTagSetOrdering(t *testing.T) {
}{
{
stmt: `SELECT sum(value) FROM cpu GROUP BY host`,
chunkSize: 1,
expected: `[{"name":"cpu","tags":{"host":"x"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",300]]},{"name":"cpu","tags":{"host":"y"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",500]]},{"name":"cpu","tags":{"host":"z"},"columns":["time","sum"],"values":[["1970-01-01T00:00:00Z",700]]}]`,
},
{
stmt: `SELECT value FROM cpu GROUP BY host`,
expected: `[{"name":"cpu","tags":{"host":"x"},"columns":["time","value"],"values":[["1970-01-01T00:00:02Z",300]]},{"name":"cpu","tags":{"host":"y"},"columns":["time","value"],"values":[["1970-01-01T00:00:01Z",100],["1970-01-01T00:00:03Z",400]]},{"name":"cpu","tags":{"host":"z"},"columns":["time","value"],"values":[["1970-01-01T00:00:01Z",200],["1970-01-01T00:00:03Z",500]]}]`,
},
}
for _, tt := range tests {