Skip to content

[TH2-4316] Add additional events to the root event with information a…#173

Open
OptimumCode wants to merge 3 commits intodevfrom
th2-4316
Open

[TH2-4316] Add additional events to the root event with information a…#173
OptimumCode wants to merge 3 commits intodevfrom
th2-4316

Conversation

@OptimumCode
Copy link
Copy Markdown
Contributor

…bout the cause of failure

@OptimumCode
Copy link
Copy Markdown
Contributor Author

@lumber1000 Please, take a look at changes

@OptimumCode
Copy link
Copy Markdown
Contributor Author

@lumber1000 Please, take a look at changes

.bodyData(EventUtils.createMessageBean(message))
.bodyData(EventUtils.createMessageBean(ex.message))
.bodyData(createMessageBean(message))
.bodyData(createMessageBean(ex.message))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.bodyData(createMessageBean(ex.message))
.exception(ex, true)

Comment on lines +361 to +380
name(
if (lastSequence == DEFAULT_SEQUENCE) {
"Rule works from the beginning of the cache"
} else {
"Rule works from the $lastSequence sequence in session ${sessionKey.sessionAlias} and direction ${sessionKey.direction}"
}
)
status(PASSED)
type("ruleStartPoint")
if (lastSequence != DEFAULT_SEQUENCE) {
messageID(sessionKey.toMessageID(lastSequence))
}
bodyData(createMessageBean("The rule starts working from " +
(if (lastSequence == DEFAULT_SEQUENCE) "start of cache" else "sequence $lastSequence") +
(checkpointTimestamp?.let {
val instant = checkpointTimestamp.toInstant()
" and expects messages between $instant and ${instant.plusMillis(taskTimeout.messageTimeout)}"
} ?: "")))
bodyData(createMessageBean("Rule timeout is set to ${taskTimeout.timeout} mls"))
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name(
if (lastSequence == DEFAULT_SEQUENCE) {
"Rule works from the beginning of the cache"
} else {
"Rule works from the $lastSequence sequence in session ${sessionKey.sessionAlias} and direction ${sessionKey.direction}"
}
)
status(PASSED)
type("ruleStartPoint")
if (lastSequence != DEFAULT_SEQUENCE) {
messageID(sessionKey.toMessageID(lastSequence))
}
bodyData(createMessageBean("The rule starts working from " +
(if (lastSequence == DEFAULT_SEQUENCE) "start of cache" else "sequence $lastSequence") +
(checkpointTimestamp?.let {
val instant = checkpointTimestamp.toInstant()
" and expects messages between $instant and ${instant.plusMillis(taskTimeout.messageTimeout)}"
} ?: "")))
bodyData(createMessageBean("Rule timeout is set to ${taskTimeout.timeout} mls"))
}
val endOfMessage = checkpointTimestamp?.let {
val instant = checkpointTimestamp.toInstant()
" and expects messages between $instant and ${instant.plusMillis(taskTimeout.messageTimeout)}"
} ?: ""
if (lastSequence == DEFAULT_SEQUENCE) {
name("Rule works from the beginning of the cache")
bodyData(createMessageBean("The rule starts working from start of cache $endOfMessage")
} else {
name("Rule works from the $lastSequence sequence in session ${sessionKey.sessionAlias} and direction ${sessionKey.direction}")
messageID(sessionKey.toMessageID(lastSequence))
bodyData(createMessageBean("The rule starts working from sequence $lastSequence $endOfMessage")
}
status(PASSED)
type("ruleStartPoint")
bodyData(createMessageBean("Rule timeout is set to ${taskTimeout.timeout} mls"))
}

.bodyData(EventUtils.createMessageBean("An unexpected exception has been thrown during result check build"))
.bodyData(EventUtils.createMessageBean(e.message))
.bodyData(createMessageBean("An unexpected exception has been thrown during result check build"))
.bodyData(createMessageBean(e.message))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.bodyData(createMessageBean(e.message))
.exception(e, true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants