package bucket import ( "fmt" "testing" "time" . "git.wecise.com/wecise/odbserver/odb" "git.wecise.com/wecise/odbserver/odb/test" "gitee.com/wecisecode/util/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type BucketLogsTests struct { Test *testing.T g *Gutil } func BucketLogsTest(t *testing.T) { g := test.TestG() t.Run("InitG", func(t *testing.T) { test := &BucketLogsTests{Test: t, g: g} test.InitG() }) t.Run("Class", func(t *testing.T) { test := &BucketLogsTests{Test: t, g: g} test.Class() }) t.Run("Data", func(t *testing.T) { test := &BucketLogsTests{Test: t, g: g} test.Data() }) time.Sleep(time.Duration(1) * time.Second) t.Run("Valid", func(t *testing.T) { test := &BucketLogsTests{Test: t, g: g} test.Valid() }) t.Run("Alter", func(t *testing.T) { test := &BucketLogsTests{Test: t, g: g} test.Alter() }) t.Run("Drop", func(t *testing.T) { test := &BucketLogsTests{Test: t, g: g} test.Drop() }) } func (t *BucketLogsTests) InitG() { require.NotNil(t.Test, t.g) } func (t *BucketLogsTests) Class() { t.g.Query(` create class if not exists /test(); alter /test/ drop column bklog3; `) // alter /test/ drop column bklog3 可能报错,忽略该错误 _, _, err := t.g.Query(` create class if not exists /test/bucketlog ( host varchar, bklog bucket { "type" : "bitlog", "files": ["*.log"], "sample" : ["2020-05-15 00:49:59,666"], "ttl" : 365 } 'full', keys(host), indexes(host) ) with key=manu, nickname='bucketlog' `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) _, _, err = t.g.Query(` create class if not exists /test/bucketlog2 ( host varchar, bklog2 bucket { "type" : "bitlog", "files": ["*.log"], "sample" : ["2020-05-15 00:49:59,666"], "ttl" : 365 } 'full', keys(host), indexes(host) ) with key=manu, nickname='bucketlog2' `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) } func (t *BucketLogsTests) Data() { var err error /*_, _, err = t.g.Query(` insert into /test/bucketlog (id) values ("linux:wecise") `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) _, _, err = t.g.Query(` insert into /test/bucketlog2 (id) values ("linux:wecise2") `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) */ _, _, err = t.g.Query(` insert into /test/bucketlog (id, bklog['file1.log']) values ('linux:wecise', ["1-1--DEBUG [CompactionExecutor:584] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-25 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-25 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-25 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-25 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"]) `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) _, _, err = t.g.Query(` insert into /test/bucketlog2 (id, bklog2['file1.log']) values ('linux:wecise2', ["1-1--DEBUG [CompactionExecutor:584] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-25 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-25 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-25 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-25 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"]) `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) _, _, err = t.g.Query(` insert into /test/bucketlog (id, bklog['file1.log']) values ('linux:wecise', ["1-1--DEBUG [CompactionExecutor:584] 2020-07-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-2--DEBUG [CompactionExecutor:583] 2020-07-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-3--DEBUG [CompactionExecutor:584] 2020-07-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-4--DEBUG [CompactionExecutor:583] 2020-07-25 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables", "1-5--DEBUG [CompactionExecutor:583] 2020-07-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-6--DEBUG [CompactionExecutor:583] 2020-07-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-7--WARN [Native-Transport-Requests-1] 2020-07-25 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key", "1-8--WARN [Native-Transport-Requests-1] 2020-07-25 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key", "1-9--INFO [Thread-3] 2020-07-25 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields", "1-10--INFO [Thread-8] 2020-07-25 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"]) `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) stat, errr := t.g.Prepare(` insert into /test/bucketlog (id, bklog[?]) values (?, ?) `) if errr != nil { logger.Errorf("%v", errr) } require.Nil(t.Test, errr) _, _, err = stat.Exec("file1.log", "linux:wecise", []string{"1-1--DEBUG [CompactionExecutor:584] 2020-09-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-2--DEBUG [CompactionExecutor:583] 2020-09-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-3--DEBUG [CompactionExecutor:584] 2020-09-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-4--DEBUG [CompactionExecutor:583] 2020-09-25 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables", "1-5--DEBUG [CompactionExecutor:583] 2020-09-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-6--DEBUG [CompactionExecutor:583] 2020-09-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables", "1-7--WARN [Native-Transport-Requests-1] 2020-09-25 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key", "1-8--WARN [Native-Transport-Requests-1] 2020-09-25 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key", "1-9--INFO [Thread-3] 2020-09-25 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields", "1-10--INFO [Thread-8] 2020-09-25 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"}) require.Nil(t.Test, err, fmt.Sprint(err)) _, _, err = stat.Exec("file1.log", "linux:wecise", `1-1--DEBUG [CompactionExecutor:584] 2020-11-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-11-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-11-25 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-11-25 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-11-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-11-25 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-11-25 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-11-25 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-11-25 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-11-25 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields`) require.Nil(t.Test, err, fmt.Sprint(err)) _, _, err = t.g.Query(` insert into /test/bucketlog (id, bklog['file1.log','file1.log','file1.log']) values ('linux:wecise', [["1-1--DEBUG [CompactionExecutor:584] 2020-06-25 01:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-25 01:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-25 01:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-25 01:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-25 01:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-25 01:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-25 01:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-25 01:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-25 01:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-25 01:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"], ["1-1--DEBUG [CompactionExecutor:584] 2020-06-25 02:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-25 02:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-25 02:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-25 02:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-25 02:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-25 02:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-25 02:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-25 02:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-25 02:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-25 02:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"], ["1-1--DEBUG [CompactionExecutor:584] 2020-06-25 03:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-25 03:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-25 03:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-25 03:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-25 03:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-25 03:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-25 03:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-25 03:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-25 03:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-25 03:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"]]) `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) _, _, err = t.g.Query(` insert into /test/bucketlog (id, bklog['file1.log','file1.log','file1.log']) values ('linux:wecise', [["1-1--DEBUG [CompactionExecutor:584] 2020-06-26 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-26 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-26 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-26 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-26 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-26 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-26 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-26 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-26 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-26 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"], ["1-1--DEBUG [CompactionExecutor:584] 2020-06-27 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-27 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-27 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-27 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-27 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-27 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-27 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-27 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-27 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-27 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"],["1-1--DEBUG [CompactionExecutor:584] 2020-06-28 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-2--DEBUG [CompactionExecutor:583] 2020-06-28 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-3--DEBUG [CompactionExecutor:584] 2020-06-28 00:49:59,666 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-4--DEBUG [CompactionExecutor:583] 2020-06-28 00:49:59,666 TimeWindowCompactionStrategy.java:117 - TWCS expired check sufficiently far in the past, checking for fully expired SSTables 1-5--DEBUG [CompactionExecutor:583] 2020-06-28 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-6--DEBUG [CompactionExecutor:583] 2020-06-28 00:49:59,667 TimeWindowCompactionStrategy.java:124 - TWCS skipping check for fully expired SSTables 1-7--WARN [Native-Transport-Requests-1] 2020-06-28 00:50:01,043 SelectStatement.java:429 - Aggregation query used without partition key 1-8--WARN [Native-Transport-Requests-1] 2020-06-28 00:50:04,072 SelectStatement.java:429 - Aggregation query used without partition key 1-9--INFO [Thread-3] 2020-06-28 00:50:08,837 IndexMatrixSchema.java:143 - [object] No need to add fields 1-10--INFO [Thread-8] 2020-06-28 00:50:08,840 IndexMatrixSchema.java:143 - [vobject] No need to add fields"]]) `) if err != nil { logger.Errorf("%v", err) } require.Nil(t.Test, err, fmt.Sprint(err)) } func (t *BucketLogsTests) Valid() { var err error _, _, err = t.g.Query(`select bklog FROM /test/bucketlog`) assert.Nil(t.Test, err) _, _, err = t.g.Query(`SELECT bklog.time('2020-04-22', '').inst() FROM /test/bucketlog`) assert.Nil(t.Test, err) _, _, err = t.g.Query(`SELECT bklog.date("2020-06-28").inst() FROM /test/bucketlog`) assert.Nil(t.Test, err) _, _, err = t.g.Query(`SELECT bklog["file*.log"{116669996670004, 116669996680008}] FROM /test/bucketlog`) assert.Nil(t.Test, err) _, _, err = t.g.Query(`SELECT bklog["file1.log"{1,3,6,7}].time('2020-06-25 00:49:59,667', '').find( "twcs skipping" ) FROM /test/bucketlog`) assert.Nil(t.Test, err) _, _, err = t.g.Query(`SELECT bklog.time('2020-06-23 14:50','2020-06-23 15:00').find('twcs'),id FROM /test/bucketlog`) assert.Nil(t.Test, err) _, _, err = t.g.Query(`SELECT id FROM /test/bucketlog where bklog.time("2020-05-01","").find("INFO").assert() `) assert.Nil(t.Test, err) _, _, err = t.g.Query(`select bklog2 FROM /test/bucketlog2`) assert.Nil(t.Test, err) } func (t *BucketLogsTests) Alter() { var err error _, _, err = t.g.Query(`alter /test add column bklog3 bucket { "type" : "bitlog", "files": ["*.log"], "sample" : ["2020-05-15 00:49:59,666"], "ttl" : 365 } 'full' `) if err != nil { fmt.Printf("%v", err) } assert.Nil(t.Test, err) } func (t *BucketLogsTests) Drop() { var err error _, _, err = t.g.Query(`delete bklog2, bklog3 from /test/bucketlog2 `) assert.Nil(t.Test, err) _, _, err = t.g.Query(`delete from /test/bucketlog2 with version`) assert.Nil(t.Test, err) _, _, err = t.g.Query(`drop class /test/bucketlog2 `) //assert.Nil(t.Test, err) }