Skip to content

Commit

Permalink
Improve test time and flaky schedule test (#2183)
Browse files Browse the repository at this point in the history
Try running CI on 16 core runners
  • Loading branch information
Quinn-With-Two-Ns authored Aug 15, 2024
1 parent abc5323 commit b9eeda0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
unit_test_edge:
name: Unit test with in-memory test service [Edge]
runs-on: ubuntu-latest
runs-on: ubuntu-latest-16-cores
timeout-minutes: 30
steps:
- name: Checkout repo
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

unit_test_jdk8:
name: Unit test with docker service [JDK8]
runs-on: ubuntu-latest
runs-on: ubuntu-latest-16-cores
timeout-minutes: 30
steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
code-coverage:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-16-cores
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,15 @@ public void triggerScheduleNoPolicy() {

@Test(timeout = 30000)
public void backfillSchedules() {
// assumeTrue("skipping for test server", SDKTestWorkflowRule.useExternalService);
Instant now = Instant.now();
Instant backfillTime = Instant.ofEpochSecond(100000);
ScheduleClient client = createScheduleClient();
// Create schedule
ScheduleOptions options =
ScheduleOptions.newBuilder()
.setBackfills(
Arrays.asList(new ScheduleBackfill(now.minusMillis(20500), now.minusMillis(10000))))
Arrays.asList(
new ScheduleBackfill(
backfillTime.minusMillis(20500), backfillTime.minusMillis(10000))))
.build();
String scheduleId = UUID.randomUUID().toString();
Schedule schedule =
Expand All @@ -283,17 +284,17 @@ public void backfillSchedules() {

handle.backfill(
Arrays.asList(
new ScheduleBackfill(now.minusMillis(5500), now.minusMillis(2500)),
new ScheduleBackfill(now.minusMillis(2500), now)));
new ScheduleBackfill(backfillTime.minusMillis(5500), backfillTime.minusMillis(2500)),
new ScheduleBackfill(backfillTime.minusMillis(2500), backfillTime)));
waitForActions(handle, 15);
// Cleanup schedule
handle.delete();
// Try to backfill a deleted schedule
try {
handle.backfill(
Arrays.asList(
new ScheduleBackfill(now.minusMillis(5500), now.minusMillis(2500)),
new ScheduleBackfill(now.minusMillis(2500), now)));
new ScheduleBackfill(backfillTime.minusMillis(5500), backfillTime.minusMillis(2500)),
new ScheduleBackfill(backfillTime.minusMillis(2500), backfillTime)));
Assert.fail();
} catch (ScheduleException e) {
}
Expand Down

0 comments on commit b9eeda0

Please sign in to comment.