Skip to content

Commit 6f4cbd9

Browse files
author
Jan Waś
committed
Adjust tests to GH API behavior changes
1 parent ce2bc6e commit 6f4cbd9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

trino-rest-github/src/main/java/pl/net/was/rest/github/GithubRest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ private Iterable<List<?>> getIssues(RestTableHandle table)
18111811
String repo = (String) filter.getFilter((RestColumnHandle) columns.get("repo"), constraint);
18121812
requirePredicate(owner, "issues.owner");
18131813
requirePredicate(repo, "issues.repo");
1814-
String since = (String) filter.getFilter((RestColumnHandle) columns.get("updated_at"), constraint, "1970-01-01T00:00:00Z");
1814+
String since = (String) filter.getFilter((RestColumnHandle) columns.get("updated_at"), constraint, "1970-01-01");
18151815
String state = (String) filter.getFilter((RestColumnHandle) columns.get("state"), constraint, "all");
18161816
SortItem sortOrder = getSortItem(table);
18171817
return getRowsFromPages(

trino-rest-github/src/test/java/pl/net/was/rest/github/TestGithubQueries.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void selectFromGithubActionsTable()
8282
"VALUES ('Release with Maven')");
8383

8484
QueryRunner runner = getQueryRunner();
85-
long runId = (long) runner.execute("SELECT id FROM runs WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND name = 'Release with Maven' ORDER BY created_at DESC LIMIT 1").getOnlyValue();
85+
long runId = (long) runner.execute("SELECT id FROM runs WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND name = 'Release with Maven' AND conclusion = 'success' ORDER BY created_at DESC LIMIT 1").getOnlyValue();
8686
assertThat(runId).isGreaterThan(0);
8787
long jobId = (long) runner.execute(format("SELECT id FROM jobs WHERE owner = 'nineinchnick' AND repo = 'trino-rest' AND run_id = %d LIMIT 1", runId)).getOnlyValue();
8888
assertThat(jobId).isGreaterThan(0);

0 commit comments

Comments
 (0)