YUKI Hiroshi
null+****@clear*****
Tue Apr 14 14:26:11 JST 2015
YUKI Hiroshi 2015-04-14 14:26:11 +0900 (Tue, 14 Apr 2015) New Revision: 0c8bdcda38a12f2e5467419acb86d15448e9f5a2 https://github.com/droonga/droonga-engine/commit/0c8bdcda38a12f2e5467419acb86d15448e9f5a2 Message: Add command test for system.absorb-data Added files: test/command/suite/system/absorb-data/records.catalog.json test/command/suite/system/absorb-data/records.expected test/command/suite/system/absorb-data/records.test Added: test/command/suite/system/absorb-data/records.catalog.json (+59 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/system/absorb-data/records.catalog.json 2015-04-14 14:26:11 +0900 (62c47ed) @@ -0,0 +1,59 @@ +{ + "datasets": { + "Default": { + }, + "Source": { + "schema": { + "Users": { + "type": "Hash", + "keyType": "ShortText" + } + }, + "fact": "Users", + "nWorkers": 2, + "plugins": ["groonga", "crud", "search", "dump", "system", "catalog"], + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { + "label": "slice020", + "weight": 50, + "volume": { + "address": "127.0.0.1:23003/droonga.020" + } + }, + { + "label": "slice021", + "weight": 50, + "volume": { + "address": "127.0.0.1:23003/droonga.021" + } + } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { + "label": "slice030", + "weight": 50, + "volume": { + "address": "127.0.0.1:23003/droonga.030" + } + }, + { + "label": "slice031", + "weight": 50, + "volume": { + "address": "127.0.0.1:23003/droonga.031" + } + } + ] + } + ] + } + } +} Added: test/command/suite/system/absorb-data/records.expected (+43 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/system/absorb-data/records.expected 2015-04-14 14:26:11 +0900 (053514f) @@ -0,0 +1,43 @@ +{ + "inReplyTo": "request-id", + "dataset": "Default", + "date": "0000-00-00T00:00:00.000000Z", + "type": "system.absorb-data.start" +} +{ + "inReplyTo": "request-id", + "dataset": "Default", + "date": "0000-00-00T00:00:00.000000Z", + "type": "system.absorb-data.start" +} +{ + "inReplyTo": "request-id", + "statusCode": 200, + "type": "system.absorb-data.result", + "body": { + "started": true + } +} +{ + "inReplyTo": "request-id", + "dataset": "Default", + "date": "0000-00-00T00:00:00.000000Z", + "body": { + "nProcessedMessages": 1, + "percentage": 100, + "message": "100% done (maybe 00:00:00 remaining)" + }, + "type": "system.absorb-data.progress" +} +{ + "inReplyTo": "request-id", + "dataset": "Default", + "date": "0000-00-00T00:00:00.000000Z", + "type": "system.absorb-data.end" +} +{ + "inReplyTo": "request-id", + "dataset": "Default", + "date": "0000-00-00T00:00:00.000000Z", + "type": "system.absorb-data.end" +} Added: test/command/suite/system/absorb-data/records.test (+21 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/system/absorb-data/records.test 2015-04-14 14:26:11 +0900 (b915f4e) @@ -0,0 +1,21 @@ +#@require-catalog-version 2 +#@disable-logging +{ + "type": "add", + "dataset": "Source", + "body": { + "table": "Users", + "key": "Adam" + } +} +#@enable-logging +{ + "type": "system.absorb-data", + "dataset": "Default", + "body": { + "host": "localhost", + "port": 23003, + "tag": "droonga", + "dataset": "Source" + } +} -------------- next part -------------- HTML����������������������������...Download