Skip to content

Commit

Permalink
Merge branch 'master' into issue-138
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Mattheis <erikmattheis@me.com>
  • Loading branch information
emattheis committed Sep 11, 2018
2 parents 846c1a5 + 42aaa2e commit e0e6c95
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 7 deletions.
28 changes: 28 additions & 0 deletions spec/src/main/asciidoc/protocol-wireformat.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ When multiple procedures are installed all procedures MUST be executed and the o
* Consumers MUST use the logical conjunction policy by default to determine the status
* Consumers MAY support custom policies to determine the status

==== Executing procedures

When executing health check procedures a producer MUST handle any unchecked exceptions and synthesize a substitute respone.

* The synthesized response MUST contain a `status` entry with a value of "DOWN".
* The synthesized response MUST contain a `name` entry with a value set to the runtime class name of the failing check.
* The synthesized response MAY contain additional information about the failure (i.e. exception message or stack trace)

== Security

Aspects regarding the secure access of health check information.
Expand Down Expand Up @@ -295,6 +303,26 @@ Status `503` and the following payload:
}
```

Status 500
```
{
"status": "DOWN",
"checks": [
{
"name": "example.health.FirstCheck",
"status": "DOWN",
"data": {
"rootCause": "timed out waiting for available connection"
}
},
{
"name": "secondCheck",
"status": "UP"
}
]
}
```

=== With no procedures expected or installed into the runtime

Status `200` and the following payload:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*/
public class DelegateProcedureSuccessfulTest extends SimpleHttp {

@Deployment
@Deployment(testable = false)
public static Archive getDeployment() throws Exception {
return createWarFileWithClasses(DelegateCheck.class, DelegationTarget.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*/
public class HealthCheckResponseAttributesTest extends SimpleHttp {

@Deployment
@Deployment(testable = false)
public static Archive getDeployment() throws Exception {
return createWarFileWithClasses(CheckWithAttributes.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/
public class MultipleProceduresFailedTest extends SimpleHttp {

@Deployment
@Deployment(testable = false)
public static Archive getDeployment() throws Exception {
return createWarFileWithClasses(FailedCheck.class, SuccessfulCheck.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public class NoProcedureSuccessfulTest extends SimpleHttp {

@Deployment
@Deployment(testable = false)
public static Archive getDeployment() throws Exception {
return createEmptyWarFile();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
public class SingleProcedureFailedTest extends SimpleHttp {

@Deployment
@Deployment(testable = false)
public static Archive getDeployment() throws Exception {
return createWarFileWithClasses(FailedCheck.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
public class SingleProcedureSuccessfulTest extends SimpleHttp {

@Deployment
@Deployment(testable = false)
public static Archive getDeployment() throws Exception {
return createWarFileWithClasses(SuccessfulCheck.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*/
public class WithQualifierTest extends SimpleHttp {

@Deployment
@Deployment(testable = false)
public static Archive getDeployment() throws Exception {
return createWarFileWithClasses(CheckWithHealthQualifier.class);
}
Expand Down

0 comments on commit e0e6c95

Please sign in to comment.