Skip to content

Commit

Permalink
Update MockProtobufService to pass my RemoteDriverMockTest
Browse files Browse the repository at this point in the history
  • Loading branch information
olivrlee committed Sep 11, 2023
1 parent b75a97f commit eb50d7e
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,31 @@ private Map<Request, Response> createMapping() {
Meta.Frame.create(0, true,
Arrays.<Object>asList(new Object[] {new Object[]{"my_table", 10}})), -1, null));

// Get the tables, no tables exist
mappings.put(
new TablesRequest(connectionId, null, null,
"additionalColumnsTest", Collections.<String>emptyList()),
// ownStatement=false just to avoid the extra close statement call.
new ResultSetResponse(null, 150, false, null, Meta.Frame.EMPTY, -1, null));
new ResultSetResponse("0", 1, false,
Meta.Signature.create(
Arrays.<ColumnMetaData>asList(
MetaImpl.columnMetaData("TABLE_CAT", 0, String.class, true),
MetaImpl.columnMetaData("TABLE_SCHEM", 1, String.class, true),
MetaImpl.columnMetaData("TABLE_NAME", 2, String.class, true),
MetaImpl.columnMetaData("TABLE_TYPE", 3, String.class, true),
MetaImpl.columnMetaData("REMARKS", 4 ,String.class, true),
MetaImpl.columnMetaData("TYPE_CAT", 5, String.class, true),
MetaImpl.columnMetaData("TYPE_SCHEME", 6, String.class, true),
MetaImpl.columnMetaData("TYPE_NAME", 7, String.class, true),
MetaImpl.columnMetaData("SELF_REFERENCING_COL_NAME", 8, String.class, true),
MetaImpl.columnMetaData("REF_GENERATION", 9, String.class, true),
MetaImpl.columnMetaData("HSQLDB_TYPE", 10, String.class, true),
MetaImpl.columnMetaData("READ_ONLY", 11, Boolean.class, true),
MetaImpl.columnMetaData("COMMIT_ACTION", 12, String.class, true),
MetaImpl.columnMetaData("EXTRA_LABEL", 13, Boolean.class, true)),
null, null, Meta.CursorFactory.ARRAY, Meta.StatementType.SELECT),
Meta.Frame.create(0, true,
Arrays.<Object>asList(new Object[] {1, "a"},
new Object[] {null, "b"}, new Object[] {3, "c"})), -1, null));

return Collections.unmodifiableMap(mappings);
}
Expand Down

0 comments on commit eb50d7e

Please sign in to comment.