resilient-http-client
Version:
This is an augmented [Angular HttpClient][angular-http-client] which overrides the get method to enrich resilience behaviour.
260 lines (252 loc) • 20.7 kB
HTML
<html><head><meta charset="utf-8"/><title>Test Report</title><style type="text/css">html,
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 1rem;
margin: 0;
padding: 0;
color: #333;
}
body {
padding: 2rem 1rem;
font-size: 0.85rem;
}
.jesthtml-content {
margin: 0 auto;
max-width: 70rem;
}
header {
display: flex;
align-items: center;
}
#title {
margin: 0;
flex-grow: 1;
}
#logo {
height: 4rem;
}
#timestamp {
color: #777;
margin-top: 0.5rem;
}
/** SUMMARY */
#summary {
color: #333;
margin: 2rem 0;
display: flex;
font-family: monospace;
font-size: 1rem;
}
#summary > div {
margin-right: 2rem;
background: #eee;
padding: 1rem;
min-width: 15rem;
}
#summary > div:last-child {
margin-right: 0;
}
@media only screen and (max-width: 720px) {
#summary {
flex-direction: column;
}
#summary > div {
margin-right: 0;
margin-top: 2rem;
}
#summary > div:first-child {
margin-top: 0;
}
}
.summary-total {
font-weight: bold;
margin-bottom: 0.5rem;
}
.summary-passed {
color: #4f8a10;
border-left: 0.4rem solid #4f8a10;
padding-left: 0.5rem;
}
.summary-failed,
.summary-obsolete-snapshots {
color: #d8000c;
border-left: 0.4rem solid #d8000c;
padding-left: 0.5rem;
}
.summary-pending {
color: #9f6000;
border-left: 0.4rem solid #9f6000;
padding-left: 0.5rem;
}
.summary-empty {
color: #999;
border-left: 0.4rem solid #999;
}
.test-result {
padding: 1rem;
margin-bottom: 0.25rem;
}
.test-result:last-child {
border: 0;
}
.test-result.passed {
background-color: #dff2bf;
color: #4f8a10;
}
.test-result.failed {
background-color: #ffbaba;
color: #d8000c;
}
.test-result.pending {
background-color: #ffdf61;
color: #9f6000;
}
.test-info {
display: flex;
justify-content: space-between;
}
.test-suitename {
width: 20%;
text-align: left;
font-weight: bold;
word-break: break-word;
}
.test-title {
width: 40%;
text-align: left;
font-style: italic;
}
.test-status {
width: 20%;
text-align: right;
}
.test-duration {
width: 10%;
text-align: right;
font-size: 0.75rem;
}
.failureMessages {
padding: 0 1rem;
margin-top: 1rem;
border-top: 1px dashed #d8000c;
}
.failureMessages.suiteFailure {
border-top: none;
}
.failureMsg {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-container {
margin-bottom: 2rem;
}
.suite-container > input[type="checkbox"] {
position: absolute;
left: -100vw;
}
.suite-container label {
display: block;
}
.suite-container .suite-tests {
overflow-y: hidden;
height: 0;
}
.suite-container > input[type="checkbox"]:checked ~ .suite-tests {
height: auto;
overflow: visible;
}
.suite-info {
padding: 1rem;
background-color: #eee;
color: #777;
display: flex;
align-items: center;
margin-bottom: 0.25rem;
}
.suite-info:hover {
background-color: #ddd;
cursor: pointer;
}
.suite-info .suite-path {
word-break: break-all;
flex-grow: 1;
font-family: monospace;
font-size: 1rem;
}
.suite-info .suite-time {
margin-left: 0.5rem;
padding: 0.2rem 0.3rem;
font-size: 0.75rem;
}
.suite-info .suite-time.warn {
background-color: #d8000c;
color: #fff;
}
.suite-info:before {
content: "\2303";
display: inline-block;
margin-right: 0.5rem;
transform: rotate(0deg);
}
.suite-container > input[type="checkbox"]:checked ~ label .suite-info:before {
transform: rotate(180deg);
}
/* CONSOLE LOGS */
.suite-consolelog {
margin-bottom: 0.25rem;
padding: 1rem;
background-color: #efefef;
}
.suite-consolelog-header {
font-weight: bold;
}
.suite-consolelog-item {
padding: 0.5rem;
}
.suite-consolelog-item pre {
margin: 0.5rem 0;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-consolelog-item-origin {
color: #777;
font-weight: bold;
}
.suite-consolelog-item-message {
color: #000;
font-size: 1rem;
padding: 0 0.5rem;
}
/* OBSOLETE SNAPSHOTS */
.suite-obsolete-snapshots {
margin-bottom: 0.25rem;
padding: 1rem;
background-color: #ffbaba;
color: #d8000c;
}
.suite-obsolete-snapshots-header {
font-weight: bold;
}
.suite-obsolete-snapshots-item {
padding: 0.5rem;
}
.suite-obsolete-snapshots-item pre {
margin: 0.5rem 0;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-obsolete-snapshots-item-message {
color: #000;
font-size: 1rem;
padding: 0 0.5rem;
}
</style></head><body><div class="jesthtml-content"><header><h1 id="title">Test Report</h1></header><div id="metadata-container"><div id="timestamp">Started: 2025-01-29 10:02:39</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (2)</div><div class="summary-passed ">2 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (44)</div><div class="summary-passed ">44 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><input id="collapsible-0" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-0"><div class="suite-info"><div class="suite-path">/home/runner/work/resilient-http-service/resilient-http-service/projects/resilient-http-client/src/lib/util/rx/resilience.rx-operator.spec.ts</div><div class="suite-time">3.897s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > events</div><div class="test-title">should only emit onFail event if disableRetry flag was true and stream caused an error</div><div class="test-status">passed</div><div class="test-duration">0.012s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > events</div><div class="test-title">should call onRetryRequest after retryIntervalInMillisList passed and the call will be retried</div><div class="test-status">passed</div><div class="test-duration">0.007s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > events</div><div class="test-title">should wait for user decision event before restarting with new retries</div><div class="test-status">passed</div><div class="test-duration">0.005s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > events</div><div class="test-title">should fail after user decision was to cancel the stream</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > events</div><div class="test-title">should fail with custom error message after user decision was to cancel the stream if a topic config was given</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > events</div><div class="test-title">should call onFail if it retried as much as specified and failed and waitForUserDecision was false</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > events</div><div class="test-title">should call onFail with custom message if it retried as much as specified and failed and waitForUserDecision was false</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator</div><div class="test-title">should throw an error if disableRetry flag was true and the observable had an error</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator</div><div class="test-title">should throw error if error status is a not within retry list</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > getTopicSpecificBooleanOrDefault behaviour</div><div class="test-title">should return the default boolean if no topic specific override config was provided and the override if provided</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > shouldLogResult behaviour</div><div class="test-title">should return default</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > shouldLogResult behaviour</div><div class="test-title">should return the override specified by topic config</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > shouldTrace behaviour</div><div class="test-title">should return default</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > shouldTrace behaviour</div><div class="test-title">should return the override specified by topic config</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > shouldLogResult behaviour</div><div class="test-title">should return default</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">An applyResilience operator > shouldLogResult behaviour</div><div class="test-title">should return the override specified by topic config</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-2" class="suite-container"><input id="collapsible-1" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-1"><div class="suite-info"><div class="suite-path">/home/runner/work/resilient-http-service/resilient-http-service/projects/resilient-http-client/src/lib/service/resilient-http-client.service.spec.ts</div><div class="suite-time">4.084s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > delayed request behaviour</div><div class="test-title">should emit a delayed request event if request duration exceeds specified amount of ms</div><div class="test-status">passed</div><div class="test-duration">0.011s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > delayed request behaviour</div><div class="test-title">should emit the topic and uuid of the delayed request</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > trace behaviour</div><div class="test-title">should log the total fetch time</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > trace behaviour</div><div class="test-title">should not log the total fetch time if the trace was disabled</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > map to request body behaviour</div><div class="test-title">should return the unwrapped message body</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > logResult behaviour</div><div class="test-title">should log the received content</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > logResult behaviour</div><div class="test-title">should not log the received content if it was disabled</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > onRequestStart behaviour</div><div class="test-title">should emit a request start event</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > onRequestFinalize behaviour</div><div class="test-title">should emit an onRequestFinalize event after success</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > onRequestFinalize behaviour</div><div class="test-title">should emit an onRequestFinalize event after error</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > failover behaviour</div><div class="test-title">should return replacement result on error</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > failover behaviour</div><div class="test-title">should rethrow the error if no failover result was configured</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > failover behaviour</div><div class="test-title">should emit onFail event with customized message</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > failover behaviour</div><div class="test-title">should default the custom onFail message to empty string</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > resilience retry behaviour</div><div class="test-title">should not retry a request which is not specified as retryable</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > resilience retry behaviour</div><div class="test-title">should retry a failed request according to config</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > resilience retry behaviour</div><div class="test-title">should fail after retry phase if waitForUserDecision was false</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > resilience retry behaviour</div><div class="test-title">should emit a WaitingForUserDecision event if the retry failed</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > resilience retry behaviour</div><div class="test-title">should not emit WaitingForUserDecision event if the retry failed and the config disabled the waiting</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > resilience retry behaviour</div><div class="test-title">should restart the retry loop on user trigger</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">A ResilientHttpClientService > resilience retry behaviour</div><div class="test-title">should fail on user retry decision</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div></div></div></div></body></html>