Browse Source

完成事件查询sdk

yjp 1 year ago
parent
commit
ccdfe1acb6
2 changed files with 461 additions and 8 deletions
  1. 150 6
      test/v1/sdk.go
  2. 311 2
      test/v1/v1_test.go

+ 150 - 6
test/v1/sdk.go

@@ -129,14 +129,12 @@ func (toolKit *ToolKit) reply(req *ports.ReplayRequest) *ToolKit {
 	return toolKit
 }
 
-func (toolKit *ToolKit) queryByWhereAndOrderBy(req *ports.QueryByWhereAndOrderByRequest, retInfosMap *[]map[string]any) *ToolKit {
+func (toolKit *ToolKit) queryByWhereAndOrderBy(req *ports.QueryByWhereAndOrderByRequest, retInfosMap *[]map[string]any, retTotalCount *int64) *ToolKit {
 	statement, infosMap, totalCount, err := clientInstance.QueryByWhereAndOrderBy(req)
 	if err != nil {
 		toolKit.t.Fatal(err)
 	}
 
-	toolKit.assertEqual(len(infosMap), int(totalCount), "总数不一致")
-
 	fmt.Println(statement)
 
 	if retInfosMap != nil {
@@ -144,17 +142,19 @@ func (toolKit *ToolKit) queryByWhereAndOrderBy(req *ports.QueryByWhereAndOrderBy
 		*retInfosMap = infosMap
 	}
 
+	if retTotalCount != nil {
+		*retTotalCount = totalCount
+	}
+
 	return toolKit
 }
 
-func (toolKit *ToolKit) commonQuery(req *ports.CommonQueryRequest, retInfosMap *[]map[string]any) *ToolKit {
+func (toolKit *ToolKit) commonQuery(req *ports.CommonQueryRequest, retInfosMap *[]map[string]any, retTotalCount *int64) *ToolKit {
 	statement, infosMap, totalCount, err := clientInstance.CommonQuery(req)
 	if err != nil {
 		toolKit.t.Fatal(err)
 	}
 
-	toolKit.assertEqual(len(infosMap), int(totalCount), "总数不一致")
-
 	fmt.Println(statement)
 
 	if retInfosMap != nil {
@@ -162,6 +162,10 @@ func (toolKit *ToolKit) commonQuery(req *ports.CommonQueryRequest, retInfosMap *
 		*retInfosMap = infosMap
 	}
 
+	if retTotalCount != nil {
+		*retTotalCount = totalCount
+	}
+
 	return toolKit
 }
 
@@ -211,6 +215,146 @@ func (toolKit *ToolKit) commonCount(req *ports.CommonCountRequest, retCount *int
 	return toolKit
 }
 
+func (toolKit *ToolKit) eventQueryByKeys(req *ports.EventQueryByKeysRequest, retInfos *[]ports.EventInfo, retTotalCount *int64) *ToolKit {
+	statement, infos, totalCount, err := clientInstance.EventQueryByKeys(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retInfos != nil {
+		*retInfos = make([]ports.EventInfo, 0)
+		*retInfos = infos
+	}
+
+	if retTotalCount != nil {
+		*retTotalCount = totalCount
+	}
+
+	return toolKit
+}
+
+func (toolKit *ToolKit) commonEventQuery(req *ports.CommonEventQueryRequest, retInfos *[]ports.EventInfo, retTotalCount *int64) *ToolKit {
+	statement, infos, totalCount, err := clientInstance.CommonEventQuery(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retInfos != nil {
+		*retInfos = make([]ports.EventInfo, 0)
+		*retInfos = infos
+	}
+
+	if retTotalCount != nil {
+		*retTotalCount = totalCount
+	}
+
+	return toolKit
+}
+
+func (toolKit *ToolKit) countEventByKeys(req *ports.CountEventByKeysRequest, retCount *int64) *ToolKit {
+	statement, count, err := clientInstance.CountEventByKeys(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retCount != nil {
+		*retCount = count
+	}
+
+	return toolKit
+}
+
+func (toolKit *ToolKit) commonCountEvent(req *ports.CommonCountEventRequest, retCount *int64) *ToolKit {
+	statement, count, err := clientInstance.CommonCountEvent(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retCount != nil {
+		*retCount = count
+	}
+
+	return toolKit
+}
+
+func (toolKit *ToolKit) eventHistoryQueryByKeys(req *ports.EventQueryByKeysRequest, retInfos *[]ports.EventInfo, retTotalCount *int64) *ToolKit {
+	statement, infos, totalCount, err := clientInstance.EventHistoryQueryByKeys(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retInfos != nil {
+		*retInfos = make([]ports.EventInfo, 0)
+		*retInfos = infos
+	}
+
+	if retTotalCount != nil {
+		*retTotalCount = totalCount
+	}
+
+	return toolKit
+}
+
+func (toolKit *ToolKit) commonEventHistoryQuery(req *ports.CommonEventQueryRequest, retInfos *[]ports.EventInfo, retTotalCount *int64) *ToolKit {
+	statement, infos, totalCount, err := clientInstance.CommonEventHistoryQuery(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retInfos != nil {
+		*retInfos = make([]ports.EventInfo, 0)
+		*retInfos = infos
+	}
+
+	if retTotalCount != nil {
+		*retTotalCount = totalCount
+	}
+
+	return toolKit
+}
+
+func (toolKit *ToolKit) countEventHistoryByKeys(req *ports.CountEventByKeysRequest, retCount *int64) *ToolKit {
+	statement, count, err := clientInstance.CountEventHistoryByKeys(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retCount != nil {
+		*retCount = count
+	}
+
+	return toolKit
+}
+
+func (toolKit *ToolKit) commonCountEventHistory(req *ports.CommonCountEventRequest, retCount *int64) *ToolKit {
+	statement, count, err := clientInstance.CommonCountEventHistory(req)
+	if err != nil {
+		toolKit.t.Fatal(err)
+	}
+
+	fmt.Println(statement)
+
+	if retCount != nil {
+		*retCount = count
+	}
+
+	return toolKit
+}
+
 func (toolKit *ToolKit) assertEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) *ToolKit {
 	assert.Equal(toolKit.t, expected, actual, msgAndArgs)
 	return toolKit

+ 311 - 2
test/v1/v1_test.go

@@ -414,6 +414,7 @@ func TestInsertBatch(t *testing.T) {
 	tableNum2 := rand.New(rand.NewSource(now2.Unix())).Intn(10)
 
 	resultsMap := make([]map[string]any, 0)
+	var totalCount int64
 
 	newToolKit(t).
 		autoMigrate(&ports.AutoMigrateRequest{
@@ -465,7 +466,8 @@ func TestInsertBatch(t *testing.T) {
 			},
 			PageNo:   1,
 			PageSize: 1,
-		}, &resultsMap).
+		}, &resultsMap, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
 		assertEqual(id1, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name1, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now1.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
@@ -481,7 +483,8 @@ func TestInsertBatch(t *testing.T) {
 			},
 			PageNo:   1,
 			PageSize: 1,
-		}, &resultsMap).
+		}, &resultsMap, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
 		assertEqual(id2, resultsMap[0]["id"], "ID不一致").
 		assertEqual(name2, resultsMap[0]["name"], "名称不一致").
 		assertEqual(now2.UnixMilli(), resultsMap[0]["time"].(time.Time).Local().UnixMilli(), "时间不一致").
@@ -740,3 +743,309 @@ func TestReply(t *testing.T) {
 		assertEqual(now.UnixMilli(), resultMap["time"].(time.Time).Local().UnixMilli(), "时间不一致").
 		assertEqual(tableNum, resultMap["table_num"], "表数量不一致")
 }
+
+func TestEventQuery(t *testing.T) {
+	initClient(t, "localhost:30170")
+	defer destroyClient(t)
+
+	tablePrefix := "test." + simpleUUID()[0:8]
+
+	id := simpleUUID()
+	name := simpleUUID()
+	now := time.Now().Local()
+	tableNum := rand.New(rand.NewSource(now.Unix())).Intn(10)
+	newName := simpleUUID()
+	newNow := time.Now().Local()
+	newTableNum := rand.New(rand.NewSource(now.Unix())).Intn(10)
+
+	var totalCount int64
+	eventInfos := make([]ports.EventInfo, 0)
+
+	newToolKit(t).
+		autoMigrate(&ports.AutoMigrateRequest{
+			DatabaseID: "2b78141779ee432295ca371b91c5cac7",
+			AutoMigrateItem: ports.AutoMigrateItem{
+				TablePrefixWithSchema: tablePrefix,
+				Version:               "v1",
+				TableModelDescribe:    tableModelDescribe,
+			},
+		}).
+		insert(&ports.InsertRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			Version:               "v1",
+			KeyColumns:            []string{"id"},
+			TableRow: map[string]any{
+				"id":        id,
+				"name":      name,
+				"time":      now,
+				"table_num": tableNum,
+			},
+			UserID: "test",
+		}).
+		update(&ports.UpdateRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			Version:               "v1",
+			KeyValues:             map[string]string{"id": id},
+			NewTableRow: map[string]any{
+				"id":        id,
+				"name":      newName,
+				"time":      newNow,
+				"table_num": newTableNum,
+			},
+			UserID: "test",
+		}).
+		countEventByKeys(&ports.CountEventByKeysRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+		}, &totalCount).
+		assertEqual(2, int(totalCount), "总数不一致").
+		commonCountEvent(&ports.CommonCountEventRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "create",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+		}, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		commonCountEvent(&ports.CommonCountEventRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "update",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+		}, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		eventQueryByKeys(&ports.EventQueryByKeysRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			PageNo:                0,
+			PageSize:              0,
+		}, &eventInfos, &totalCount).
+		assertEqual(2, int(totalCount), "总数不一致").
+		assertEqual(2, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("create", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		assertEqual(id, eventInfos[1].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[1].Version, "版本不一致").
+		assertEqual("update", eventInfos[1].Operation, "操作不一致").
+		assertEqual("test", eventInfos[1].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[1].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[1].Value, "值为空不一致").
+		eventQueryByKeys(&ports.EventQueryByKeysRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			PageNo:                1,
+			PageSize:              1,
+		}, &eventInfos, &totalCount).
+		assertEqual(2, int(totalCount), "总数不一致").
+		assertEqual(1, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("create", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		commonEventQuery(&ports.CommonEventQueryRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "create",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+			PageNo:                0,
+			PageSize:              0,
+		}, &eventInfos, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		assertEqual(1, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("create", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		commonEventQuery(&ports.CommonEventQueryRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "update",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+			PageNo:                0,
+			PageSize:              0,
+		}, &eventInfos, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		assertEqual(1, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("update", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		delete(&ports.DeleteRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			Version:               "v1",
+			KeyValues:             map[string]string{"id": id},
+			UserID:                "test",
+		}).
+		countEventHistoryByKeys(&ports.CountEventByKeysRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+		}, &totalCount).
+		assertEqual(3, int(totalCount), "总数不一致").
+		commonCountEventHistory(&ports.CommonCountEventRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "create",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+		}, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		commonCountEventHistory(&ports.CommonCountEventRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "update",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+		}, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		commonCountEventHistory(&ports.CommonCountEventRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "delete",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+		}, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		eventHistoryQueryByKeys(&ports.EventQueryByKeysRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			PageNo:                0,
+			PageSize:              0,
+		}, &eventInfos, &totalCount).
+		assertEqual(3, int(totalCount), "总数不一致").
+		assertEqual(3, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("create", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		assertEqual(id, eventInfos[1].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[1].Version, "版本不一致").
+		assertEqual("update", eventInfos[1].Operation, "操作不一致").
+		assertEqual("test", eventInfos[1].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[1].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[1].Value, "值为空不一致").
+		assertEqual(id, eventInfos[2].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[2].Version, "版本不一致").
+		assertEqual("delete", eventInfos[2].Operation, "操作不一致").
+		assertEqual("test", eventInfos[2].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[2].CreateTime, "创建事件为空").
+		assertEqual("", eventInfos[2].Value, "值为空不一致").
+		eventHistoryQueryByKeys(&ports.EventQueryByKeysRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			PageNo:                1,
+			PageSize:              1,
+		}, &eventInfos, &totalCount).
+		assertEqual(3, int(totalCount), "总数不一致").
+		assertEqual(1, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("create", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		commonEventHistoryQuery(&ports.CommonEventQueryRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "create",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+			PageNo:                0,
+			PageSize:              0,
+		}, &eventInfos, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		assertEqual(1, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("create", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		commonEventHistoryQuery(&ports.CommonEventQueryRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "update",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+			PageNo:                0,
+			PageSize:              0,
+		}, &eventInfos, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		assertEqual(1, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("update", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertNotEmpty(eventInfos[0].Value, "值为空不一致").
+		commonEventHistoryQuery(&ports.CommonEventQueryRequest{
+			DatabaseID:            "2b78141779ee432295ca371b91c5cac7",
+			TablePrefixWithSchema: tablePrefix,
+			KeyValues:             []string{id},
+			Version:               "v1",
+			Operation:             "delete",
+			CreatorID:             "test",
+			StartCreatedTime:      now.Format(time.DateTime),
+			EndCreatedTime:        now.Add(time.Second).Format(time.DateTime),
+			PageNo:                0,
+			PageSize:              0,
+		}, &eventInfos, &totalCount).
+		assertEqual(1, int(totalCount), "总数不一致").
+		assertEqual(1, len(eventInfos), "事件数量不一致").
+		assertEqual(id, eventInfos[0].Key, "关键字段不一致").
+		assertEqual("v1", eventInfos[0].Version, "版本不一致").
+		assertEqual("delete", eventInfos[0].Operation, "操作不一致").
+		assertEqual("test", eventInfos[0].CreatorID, "创建者ID不一致").
+		assertNotEmpty(eventInfos[0].CreateTime, "创建事件为空").
+		assertEqual("", eventInfos[0].Value, "值为空不一致")
+}