-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BE: Make gh version check timeout configurable
- Loading branch information
Showing
4 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
api/src/test/java/io/kafbat/ui/service/ApplicationInfoServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.kafbat.ui.service; | ||
|
||
import static io.kafbat.ui.util.GithubReleaseInfo.GITHUB_RELEASE_INFO_TIMEOUT; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import io.kafbat.ui.AbstractIntegrationTest; | ||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
public class ApplicationInfoServiceTest extends AbstractIntegrationTest { | ||
private static final int timeout = 100; | ||
|
||
@Autowired | ||
private ApplicationInfoService service; | ||
|
||
@BeforeAll | ||
public static void setup() { | ||
System.setProperty(GITHUB_RELEASE_INFO_TIMEOUT, String.valueOf(timeout)); | ||
} | ||
|
||
@Test | ||
public void testCustomGithubReleaseInfoTimeout() { | ||
assertEquals(timeout, service.githubReleaseInfo().getGithubApiMaxWaitTime()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters