Skip to content

Commit ebd31ee

Browse files
author
Nikos Papailiou
committed
Fix tests
1 parent a0d999d commit ebd31ee

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.github/workflows/github_actions.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ jobs:
1717
- name: checkout
1818
uses: actions/checkout@v3
1919

20+
- name: Set up Java
21+
uses: actions/setup-java@v2
22+
with:
23+
distribution: 'adopt'
24+
java-version: '11'
25+
check-latest: true
26+
2027
- run: |
2128
unset SYSTEM
2229
./gradlew assemble;

src/main/java/examples/Examples.java

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public static void main(String[] args) throws ApiException {
5555
private static void runSQL(TileDBClient tileDBClient) {
5656
SQLParameters sqlParameters = new SQLParameters();
5757
sqlParameters.setQuery("SELECT * FROM `tiledb://TileDB-Inc/quickstart_sparse`");
58-
TileDBSQL tileDBSQL = new TileDBSQL(tileDBClient, "TileDB-Inc", sqlParameters);
58+
TileDBSQL tileDBSQL = new TileDBSQL(tileDBClient, "unittest", sqlParameters);
5959
System.out.println(tileDBSQL.exec());
6060
}
6161

6262
private static void runSQLArrow(TileDBClient tileDBClient) {
6363
SQLParameters sqlParameters = new SQLParameters();
6464
sqlParameters.setQuery("SELECT * FROM `tiledb://TileDB-Inc/quickstart_sparse`");
65-
TileDBSQL tileDBSQL = new TileDBSQL(tileDBClient, "TileDB-Inc", sqlParameters);
65+
TileDBSQL tileDBSQL = new TileDBSQL(tileDBClient, "unittest", sqlParameters);
6666
Pair<ArrayList<ValueVector>, Integer> a = tileDBSQL.execArrow();
6767
}
6868

@@ -71,7 +71,7 @@ private static void runSQLArrow(TileDBClient tileDBClient) {
7171
* @param tileDBClient
7272
*/
7373
private static void runGenericUDF(TileDBClient tileDBClient){
74-
TileDBUDF tileDBUDF = new TileDBUDF(tileDBClient, "TileDB-Inc");
74+
TileDBUDF tileDBUDF = new TileDBUDF(tileDBClient, "unittest");
7575
GenericUDF genericUDF = new GenericUDF();
7676
genericUDF.setUdfInfoName("TileDB-Inc/args-udf");
7777
HashMap<String,Object> arguments = new HashMap<>();
@@ -86,7 +86,7 @@ private static void runGenericUDF(TileDBClient tileDBClient){
8686
* @param tileDBClient
8787
*/
8888
public static void runArrayUDF(TileDBClient tileDBClient){
89-
TileDBUDF tileDBUDF = new TileDBUDF(tileDBClient, "TileDB-Inc");
89+
TileDBUDF tileDBUDF = new TileDBUDF(tileDBClient, "unittest");
9090
ArrayList<BigDecimal> range1 = new ArrayList<>();
9191
range1.add(BigDecimal.valueOf(1));
9292
range1.add(BigDecimal.valueOf(4));
@@ -110,15 +110,15 @@ public static void runArrayUDF(TileDBClient tileDBClient){
110110
UDFArrayDetails array = new UDFArrayDetails();
111111
array.setUri("tiledb://TileDB-Inc/quickstart_sparse");
112112

113-
System.out.println(tileDBUDF.executeSingleArray(genericUDF, array, queryRanges, "TileDB-Inc"));
113+
System.out.println(tileDBUDF.executeSingleArray(genericUDF, array, queryRanges, "unittest"));
114114
}
115115

116116
/**
117117
* Runs a multi-array UDF on multiple TileDB arrays
118118
* @param tileDBClient
119119
*/
120120
public static void runMultiArrayUDF(TileDBClient tileDBClient){
121-
TileDBUDF tileDBUDF = new TileDBUDF(tileDBClient, "TileDB-Inc");
121+
TileDBUDF tileDBUDF = new TileDBUDF(tileDBClient, "unittest");
122122

123123
ArrayList<BigDecimal> range1 = new ArrayList<>();
124124
range1.add(BigDecimal.valueOf(1));
@@ -139,22 +139,22 @@ public static void runMultiArrayUDF(TileDBClient tileDBClient){
139139

140140
//array1
141141
UDFArrayDetails array1 = new UDFArrayDetails();
142-
array1.setUri("tiledb://shaunreed/dense-array");
142+
array1.setUri("tiledb://TileDB-Inc/quickstart_sparse");
143143
array1.setRanges(queryRanges);
144-
array1.setBuffers(Arrays.asList("rows", "cols", "a1"));
144+
array1.setBuffers(Arrays.asList("rows", "cols", "a"));
145145
arrays.add(array1);
146146

147147
//array2
148148
UDFArrayDetails array2 = new UDFArrayDetails();
149-
array2.setUri("tiledb://TileDB-Inc/quickstart_dense");
149+
array2.setUri("tiledb://TileDB-Inc/quickstart_sparse-eu-west-2");
150150
array2.setRanges(queryRanges);
151151
array2.setBuffers(Arrays.asList("rows", "cols", "a"));
152152
arrays.add(array2);
153153

154154
multiArrayUDF.setArrays(arrays);
155155

156156
HashMap<String,Object> arguments = new HashMap<>();
157-
arguments.put("attr1", "a1");
157+
arguments.put("attr1", "a");
158158
arguments.put("attr2", "a");
159159

160160
multiArrayUDF.setArgument(serializeArgs(arguments));
@@ -207,17 +207,16 @@ private static void listGroups(TileDBClient tileDBClient)
207207
Integer page = null; // Integer | pagination offset
208208
Integer perPage = null; // Integer | pagination limit
209209
String search = null; // String | search string that will look at name, namespace or description fields
210-
String namespace = "TileDB-Inc"; // String | namespace
210+
String namespace = "unittest"; // String | namespace
211211
String orderby = null; // String | sort by which field valid values include last_accessed, size, name
212212
String permissions = null; // String | permissions valid values include read, read_write, write, admin
213213
String groupType = "generic"; // String | filter by a specific group type
214214
List<String> tag = null; // List<String> | tag to search for, more than one can be included
215215
List<String> excludeTag = null; // List<String> | tags to exclude matching array in results, more than one can be included
216216
Boolean flat = true; // Boolean | if true, ignores the nesting of groups and searches all of them
217217
String parent = null; // String | search only the children of the groups with this uuid
218-
Boolean withMetadata = false;
219218
try {
220-
GroupBrowserData result = apiInstance.listPublicGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent, withMetadata);
219+
GroupBrowserData result = apiInstance.listPublicGroups(page, perPage, groupType, search, namespace, orderby, permissions, tag, excludeTag, flat, parent);
221220
//or use api.listOwnedGroups(...) / api.listSharedGroups(...)
222221
System.out.println(result.getGroups());
223222
} catch (ApiException e) {
@@ -232,12 +231,11 @@ private static void listGroups(TileDBClient tileDBClient)
232231

233232
private static void listArrays(TileDBClient tileDBClient)
234233
{
235-
String namespace = "dstara"; // String | namespace array is in (an organization name or user's username)
236-
Boolean withMetadata = false;
234+
String namespace = "unittest"; // String | namespace array is in (an organization name or user's username)
237235
ArrayApi apiInstance = new ArrayApi(tileDBClient.getApiClient());
238236

239237
try {
240-
List<ArrayInfo> result = apiInstance.getArraysInNamespace(namespace, withMetadata);
238+
List<ArrayInfo> result = apiInstance.getArraysInNamespace(namespace);
241239
System.out.println(result);
242240
} catch (ApiException e) {
243241
System.err.println("Exception when calling ArrayApi#getArraysInNamespace");
@@ -349,4 +347,3 @@ public static void registerArray(TileDBClient tileDBClient){
349347
}
350348
}
351349
}
352-

0 commit comments

Comments
 (0)