Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add health check endpoint #3501

Merged
merged 23 commits into from
Oct 16, 2019
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fd22534
feat: add healthcheck endpoint
vcrfxia Oct 7, 2019
6d10311
feat: switch to configexception
vcrfxia Oct 8, 2019
5abf820
feat: make healthcheck interval configurable
vcrfxia Oct 8, 2019
4cebe97
feat: update healthcheck response detail to be a class
vcrfxia Oct 8, 2019
34441bd
feat: healthcheck should not be authenticated
vcrfxia Oct 8, 2019
89297e6
Merge branch 'master' into healthcheck-endpoint
vcrfxia Oct 9, 2019
47818cf
refactor: split out KsqlTarget helper methods
vcrfxia Oct 9, 2019
d619f74
fix: use ServerInternalKsqlClient to get around auth issues
vcrfxia Oct 9, 2019
612f0c0
fix: make Check an interface
vcrfxia Oct 10, 2019
f795d34
fix: move cached response expiry into ResponseCache
vcrfxia Oct 10, 2019
5fa0002
docs: add java doc to ServerInternalKsqlClient
vcrfxia Oct 10, 2019
e8e0647
refactor: make health check two words
vcrfxia Oct 10, 2019
fc0bbba
docs: add docs for new endpoint
vcrfxia Oct 10, 2019
cae31e6
docs: jim's feedback
vcrfxia Oct 10, 2019
548ca3c
refactor: switch to Guava's cache implementation
vcrfxia Oct 14, 2019
3a754bd
fix: sergio's feedback
vcrfxia Oct 14, 2019
ef0797f
fix: checkstyle
vcrfxia Oct 14, 2019
2611061
fix: fix bug in getting entity from response. add integration test
vcrfxia Oct 15, 2019
6d2103b
test: vinoth's feedback
vcrfxia Oct 15, 2019
a678d9e
refactor: switch to LoadingCache
vcrfxia Oct 15, 2019
01cf409
style: checkstyle
vcrfxia Oct 15, 2019
8b176f3
fix: findbugs
vcrfxia Oct 15, 2019
0db13de
fix: make check names public so clients don't have to hardcode
vcrfxia Oct 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: vinoth's feedback
  • Loading branch information
vcrfxia committed Oct 15, 2019
commit 6d2103be4f543effd3e87975599ab507dfaf7e49
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.confluent.ksql.rest.healthcheck.HealthCheckAgent;
import java.time.Duration;
import javax.ws.rs.core.Response;
import org.apache.kafka.test.TestUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -80,12 +81,12 @@ public void shouldRecheckHealthIfCachedResponseExpired() throws Exception {
// Given:
healthCheckResource = new HealthCheckResource(healthCheckAgent, Duration.ofMillis(10));
healthCheckResource.checkHealth();
Thread.sleep(11);

// When:
final Response response = healthCheckResource.checkHealth();

// Then:
assertThat(response.getEntity(), sameInstance(response2));
// When / Then:
TestUtils.waitForCondition(
() -> healthCheckResource.checkHealth().getEntity() == response2,
1000,
"Should receive response2 once response1 expires."
);
}
}