Skip to content

Commit 9b3d3f4

Browse files
committed
add info log to test
1 parent d3532d7 commit 9b3d3f4

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

src/test/java/com/aliyun/openservices/ots/integration/FilterAdvanceTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public void testReadRangeFilterRows() throws Exception {
120120
Utils.sleepSeconds(SECONDS_UNTIL_TABLE_READY);
121121

122122
// put 10000 rows * 10 cols * 1 version
123+
LOG.info("put 1000 rows");
123124
int kRowCount = 10000;
124125
int kColumnCount = 10;
125126
Map<String, ColumnValue> columns = new HashMap<String, ColumnValue>();
@@ -134,6 +135,7 @@ public void testReadRangeFilterRows() throws Exception {
134135
}
135136

136137
// 正向,通过filter读出的行数
138+
LOG.info("check result");
137139
checkReadRangeResult(0, Direction.FORWARD);
138140
checkReadRangeResult(1, Direction.FORWARD);
139141
checkReadRangeResult(4999, Direction.FORWARD);
@@ -328,6 +330,7 @@ public void testFilterIfMissing1000Rows() throws Exception {
328330
List<Row> expectRows2 = new ArrayList<Row>();
329331

330332
// put 1000 rows
333+
LOG.info("put 1000 rows");
331334
for (int i = 0; i < 500; i++) {
332335
Map<String, ColumnValue> columns = new HashMap<String, ColumnValue>();
333336
RowPrimaryKey pk = new RowPrimaryKey().addPrimaryKeyColumn("pk", PrimaryKeyValue.fromLong(i));
@@ -378,6 +381,7 @@ public void testFilterIfMissing1000Rows() throws Exception {
378381
rangeRowQueryCriteria.setExclusiveEndPrimaryKey(endKey);
379382
rangeRowQueryCriteria.setFilter(filter);
380383

384+
LOG.info("start get range");
381385
List<Row> allRows = new ArrayList<Row>();
382386
RowPrimaryKey nextKey = beginKey;
383387
while (nextKey != null) {
@@ -396,6 +400,7 @@ public void testFilterIfMissing1000Rows() throws Exception {
396400
filter.setPassIfMissing(true);
397401
rangeRowQueryCriteria.setFilter(filter);
398402

403+
LOG.info("check result");
399404
allRows.clear();
400405
nextKey = beginKey;
401406
while (nextKey != null) {

src/test/java/com/aliyun/openservices/ots/integration/FilterRestrictionAndParamCheckingTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ private void testFilterWithMaxNameLength(CompositeCondition compositeFilter) {
14221422

14231423
List<Row> rows = new ArrayList<Row>();
14241424

1425-
// get row
1425+
LOG.info("get row");
14261426
{
14271427

14281428
GetRowRequest request = new GetRowRequest();
@@ -1436,7 +1436,7 @@ private void testFilterWithMaxNameLength(CompositeCondition compositeFilter) {
14361436
rows.add(result.getRow());
14371437
}
14381438

1439-
// get range
1439+
LOG.info("get range");
14401440
{
14411441
RowPrimaryKey begin = new RowPrimaryKey().addPrimaryKeyColumn("PK0", PrimaryKeyValue.fromLong(0));
14421442
RowPrimaryKey end = new RowPrimaryKey().addPrimaryKeyColumn("PK0", PrimaryKeyValue.fromLong(10));
@@ -1454,7 +1454,7 @@ private void testFilterWithMaxNameLength(CompositeCondition compositeFilter) {
14541454
rows.add(result.getRows().get(0));
14551455
}
14561456

1457-
// batch get row
1457+
LOG.info("batch get row");
14581458
{
14591459
MultiRowQueryCriteria criteria = new MultiRowQueryCriteria(tableName);
14601460

@@ -1470,6 +1470,7 @@ private void testFilterWithMaxNameLength(CompositeCondition compositeFilter) {
14701470
rows.add(result.getSucceedRows().get(0).getRow());
14711471
}
14721472

1473+
LOG.info("check result");
14731474
for (Row row : rows) {
14741475
Row expect = new Row();
14751476
expect.addColumn("PK0", ColumnValue.fromLong(0));

src/test/java/com/aliyun/openservices/ots/integration/OTSClientTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ public void testGetRange() throws Exception {
668668

669669
// test get range each time with one primary key value range from INF_MIN to INF_MAX and other primary key in a specific value
670670
{
671-
// test flag from INF_MIN to INF_MAX
671+
LOG.info("test flag from INF_MIN to INF_MAX");
672672
int i = 3;
673673
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
674674
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -690,7 +690,7 @@ public void testGetRange() throws Exception {
690690
compareRow(result.getRows().get(0), i, new String[]{"uid", "name", "sid", "flag", "col_integer", "col_string", "col_boolean", "col_double", "col_binary"});
691691
}
692692
{
693-
// test name from INF_MIN to INF_MAX
693+
LOG.info("test name from INF_MIN to INF_MAX");
694694
int i = 3;
695695
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
696696
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -712,7 +712,7 @@ public void testGetRange() throws Exception {
712712
compareRow(result.getRows().get(0), i, new String[]{"uid", "name", "sid", "flag", "col_integer", "col_string", "col_boolean", "col_double", "col_binary"});
713713
}
714714
{
715-
// test uid from INF_MIN to INF_MAX
715+
LOG.info("test uid from INF_MIN to INF_MAX");
716716
int i = 0;
717717
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
718718
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -738,8 +738,8 @@ public void testGetRange() throws Exception {
738738
}
739739
}
740740

741-
// test get range in primary keys all in different value
742741
{
742+
LOG.info("test get range in primary keys all in different value");
743743
int i = 0;
744744
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
745745
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -775,7 +775,7 @@ public void testGetRange() throws Exception {
775775

776776
// test get range with limit
777777
{
778-
// test uid from INF_MIN to INF_MAX
778+
LOG.info("test uid from INF_MIN to INF_MAX");
779779
int i = 0;
780780
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
781781
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -805,7 +805,7 @@ public void testGetRange() throws Exception {
805805

806806
// test get a large range, expect next start key is returned, and with next start key, we can read all rows in the range
807807
{
808-
// test uid from INF_MIN to INF_MAX
808+
LOG.info("test uid from INF_MIN to INF_MAX");
809809
int i = 0;
810810
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
811811
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -835,7 +835,7 @@ public void testGetRange() throws Exception {
835835

836836
// test get a large range with iterator, expect all rows in range is returned
837837
{
838-
// test uid from INF_MIN to INF_MAX
838+
LOG.info("test uid from INF_MIN to INF_MAX");
839839
int i = 0;
840840
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
841841
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -862,7 +862,7 @@ public void testGetRange() throws Exception {
862862

863863
// test get a large range with iterator, set limit, expect all rows in range is returned
864864
{
865-
// test uid from INF_MIN to INF_MAX
865+
LOG.info("test uid from INF_MIN to INF_MAX");
866866
int i = 0;
867867
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
868868
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -890,7 +890,7 @@ public void testGetRange() throws Exception {
890890
}
891891
}
892892
{
893-
// test uid from INF_MIN to INF_MAX
893+
LOG.info("test uid from INF_MIN to INF_MAX");
894894
int i = 0;
895895
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
896896
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -919,7 +919,7 @@ public void testGetRange() throws Exception {
919919
}
920920
}
921921
{
922-
// test uid from INF_MIN to INF_MAX
922+
LOG.info("test uid from INF_MIN to INF_MAX");
923923
int i = 0;
924924
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
925925
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -945,7 +945,7 @@ public void testGetRange() throws Exception {
945945
}
946946
}
947947
{
948-
// test uid from INF_MIN to INF_MAX
948+
LOG.info("test uid from INF_MIN to INF_MAX");
949949
int i = 0;
950950
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
951951
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -972,7 +972,7 @@ public void testGetRange() throws Exception {
972972
}
973973
}
974974
{
975-
// test uid from INF_MIN to INF_MAX
975+
LOG.info("test uid from INF_MIN to INF_MAX");
976976
int i = 0;
977977
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(i);
978978
RowPrimaryKey exclusiveEndPrimaryKey = getRowPrimaryKeys(i);
@@ -1001,8 +1001,8 @@ public void testGetRange() throws Exception {
10011001
}
10021002
}
10031003

1004-
// test a really large data set
10051004
{
1005+
LOG.info("test a really large data set");
10061006
generateDataForTest(tableName, 1000, 59999);
10071007
// test uid from 1000 to 100001
10081008
RowPrimaryKey inclusiveStartPrimaryKey = getRowPrimaryKeys(0);

0 commit comments

Comments
 (0)