@@ -115,7 +115,7 @@ TEST_F(TTLTest, schematest) {
115
115
" `age` int,\n "
116
116
" `gender` string,\n "
117
117
" `row_timestamp` timestamp\n "
118
- " ) ttl_duration = 100, ttl_col = row_timestamp" ;
118
+ " ) ttl_duration = 100, ttl_col = \" row_timestamp\" " ;
119
119
std::vector<uniform_tuple_t <std::string, 2 >> expected{
120
120
{" man" , createTagStr},
121
121
};
@@ -160,7 +160,7 @@ TEST_F(TTLTest, schematest) {
160
160
" `age` int,\n "
161
161
" `gender` string,\n "
162
162
" `row_timestamp` timestamp\n "
163
- " ) ttl_duration = 0, ttl_col = row_timestamp" ;
163
+ " ) ttl_duration = 0, ttl_col = \" row_timestamp\" " ;
164
164
std::vector<uniform_tuple_t <std::string, 2 >> expected{
165
165
{" woman" , createTagStr},
166
166
};
@@ -186,7 +186,7 @@ TEST_F(TTLTest, schematest) {
186
186
" `age` int,\n "
187
187
" `gender` string,\n "
188
188
" `row_timestamp` timestamp\n "
189
- " ) ttl_duration = 0, ttl_col = row_timestamp" ;
189
+ " ) ttl_duration = 0, ttl_col = \" row_timestamp\" " ;
190
190
std::vector<uniform_tuple_t <std::string, 2 >> expected{
191
191
{" only_ttl_col" , createTagStr},
192
192
};
@@ -210,7 +210,7 @@ TEST_F(TTLTest, schematest) {
210
210
" `age` int,\n "
211
211
" `gender` string,\n "
212
212
" `row_timestamp` timestamp\n "
213
- " ) ttl_duration = 50, ttl_col = row_timestamp" ;
213
+ " ) ttl_duration = 50, ttl_col = \" row_timestamp\" " ;
214
214
std::vector<uniform_tuple_t <std::string, 2 >> expected{
215
215
{" woman" , createTagStr},
216
216
};
@@ -241,11 +241,16 @@ TEST_F(TTLTest, schematest) {
241
241
" `age` int,\n "
242
242
" `gender` string,\n "
243
243
" `row_timestamp` timestamp\n "
244
- " ) ttl_duration = 200, ttl_col = row_timestamp" ;
244
+ " ) ttl_duration = 200, ttl_col = \" row_timestamp\" " ;
245
245
std::vector<uniform_tuple_t <std::string, 2 >> expected{
246
246
{" woman" , createTagStr},
247
247
};
248
248
ASSERT_TRUE (verifyResult (resp, expected));
249
+
250
+ // check the createTagStr can be execute
251
+ ASSERT_EQ (cpp2::ErrorCode::SUCCEEDED, client->execute (" DROP TAG woman" , resp));
252
+
253
+ ASSERT_EQ (cpp2::ErrorCode::SUCCEEDED, client->execute (createTagStr, resp));
249
254
}
250
255
// When the column is as TTL column, droping column
251
256
{
@@ -288,7 +293,7 @@ TEST_F(TTLTest, schematest) {
288
293
" `email` string,\n "
289
294
" `age` int,\n "
290
295
" `gender` string\n "
291
- " ) ttl_duration = 100, ttl_col = age" ;
296
+ " ) ttl_duration = 100, ttl_col = \" age\" " ;
292
297
std::vector<uniform_tuple_t <std::string, 2 >> expected{
293
298
{" woman" , createTagStr},
294
299
};
@@ -399,11 +404,16 @@ TEST_F(TTLTest, schematest) {
399
404
" `age` int,\n "
400
405
" `gender` string,\n "
401
406
" `row_timestamp` timestamp\n "
402
- " ) ttl_duration = 100, ttl_col = row_timestamp" ;
407
+ " ) ttl_duration = 100, ttl_col = \" row_timestamp\" " ;
403
408
std::vector<uniform_tuple_t <std::string, 2 >> expected{
404
409
{" work1" , createEdgeStr},
405
410
};
406
411
ASSERT_TRUE (verifyResult (resp, expected));
412
+
413
+ // check the createEdgeStr can be execute
414
+ ASSERT_EQ (cpp2::ErrorCode::SUCCEEDED, client->execute (" DROP EDGE work1" , resp));
415
+
416
+ ASSERT_EQ (cpp2::ErrorCode::SUCCEEDED, client->execute (createEdgeStr, resp));
407
417
}
408
418
409
419
// Disable implicit ttl mode
@@ -442,7 +452,7 @@ TEST_F(TTLTest, schematest) {
442
452
" `age` int,\n "
443
453
" `gender` string,\n "
444
454
" `start_time` timestamp\n "
445
- " ) ttl_duration = 0, ttl_col = start_time" ;
455
+ " ) ttl_duration = 0, ttl_col = \" start_time\" " ;
446
456
std::vector<uniform_tuple_t <std::string, 2 >> expected{
447
457
{" work2" , createEdgeStr},
448
458
};
@@ -468,7 +478,7 @@ TEST_F(TTLTest, schematest) {
468
478
" `age` int,\n "
469
479
" `gender` string,\n "
470
480
" `row_timestamp` timestamp\n "
471
- " ) ttl_duration = 0, ttl_col = row_timestamp" ;
481
+ " ) ttl_duration = 0, ttl_col = \" row_timestamp\" " ;
472
482
std::vector<uniform_tuple_t <std::string, 2 >> expected{
473
483
{" edge_only_ttl_col" , createEdgeStr},
474
484
};
@@ -493,7 +503,7 @@ TEST_F(TTLTest, schematest) {
493
503
" `age` int,\n "
494
504
" `gender` string,\n "
495
505
" `start_time` timestamp\n "
496
- " ) ttl_duration = 50, ttl_col = start_time" ;
506
+ " ) ttl_duration = 50, ttl_col = \" start_time\" " ;
497
507
std::vector<uniform_tuple_t <std::string, 2 >> expected{
498
508
{" work2" , createEdgeStr},
499
509
};
@@ -524,7 +534,7 @@ TEST_F(TTLTest, schematest) {
524
534
" `age` int,\n "
525
535
" `gender` string,\n "
526
536
" `start_time` timestamp\n "
527
- " ) ttl_duration = 200, ttl_col = start_time" ;
537
+ " ) ttl_duration = 200, ttl_col = \" start_time\" " ;
528
538
std::vector<uniform_tuple_t <std::string, 2 >> expected{
529
539
{" work2" , createEdgeStr},
530
540
};
@@ -570,7 +580,7 @@ TEST_F(TTLTest, schematest) {
570
580
" `email` string,\n "
571
581
" `age` int,\n "
572
582
" `gender` string\n "
573
- " ) ttl_duration = 100, ttl_col = age" ;
583
+ " ) ttl_duration = 100, ttl_col = \" age\" " ;
574
584
std::vector<uniform_tuple_t <std::string, 2 >> expected{
575
585
{" work2" , createTagStr},
576
586
};
@@ -1124,3 +1134,4 @@ TEST_F(TTLTest, Datatest) {
1124
1134
1125
1135
} // namespace graph
1126
1136
} // namespace nebula
1137
+
0 commit comments