Skip to content

Commit

Permalink
Fixes an issue where jobrunr tests would fail if the app was running (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
spokenbird authored Oct 15, 2024
1 parent 159854d commit 485f536
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/ilgcc/jobs/PdfTransmissionJobTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void setUp() {
jobScheduler = JobRunr.configure()
.useStorageProvider(storageProvider)
.useJobActivator(this::jobActivator)
.useDashboard()
.useDashboard(1337)
.useBackgroundJobServer(usingStandardBackgroundJobServerConfiguration()
.andPollInterval(ofMillis(200))).initialize().getJobScheduler();

Expand Down Expand Up @@ -145,6 +145,6 @@ private <T> T jobActivator(Class<T> clazz) {
}

private String getSucceededJobs() {
return getJson("http://localhost:8000/api/jobs?state=SUCCEEDED");
return getJson("http://localhost:1337/api/jobs?state=SUCCEEDED");
}
}
8 changes: 4 additions & 4 deletions src/test/java/org/ilgcc/jobs/SampleJobsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class SampleJobsTest {
public void startJobRunr() {
testService = new SampleJobProcessor();

JobRunr.configure().useStorageProvider(storageProvider).useJobActivator(this::jobActivator).useDashboard()
JobRunr.configure().useStorageProvider(storageProvider).useJobActivator(this::jobActivator).useDashboard(1337)
.useBackgroundJobServer(usingStandardBackgroundJobServerConfiguration().andPollInterval(ofMillis(200))).initialize();
}

Expand Down Expand Up @@ -88,15 +88,15 @@ void testLongRunningJobUsingInstance() {
}

private String getSucceededJobs() {
return getJson("http://localhost:8000/api/jobs?state=SUCCEEDED");
return getJson("http://localhost:1337/api/jobs?state=SUCCEEDED");
}

private String getEnqueuedJobs() {
return getJson("http://localhost:8000/api/jobs?state=ENQUEUED");
return getJson("http://localhost:1337/api/jobs?state=ENQUEUED");
}

private String getProcessingJobs() {
return getJson("http://localhost:8000/api/jobs?state=PROCESSING");
return getJson("http://localhost:1337/api/jobs?state=PROCESSING");
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 485f536

Please sign in to comment.