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

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

OptimumCode
Copy link
Member

…bout the cause of failure

@OptimumCode
Copy link
Member Author

@lumber1000 Please, take a look at changes

@OptimumCode
Copy link
Member Author

@lumber1000 Please, take a look at changes

.bodyData(EventUtils.createMessageBean(message))
.bodyData(EventUtils.createMessageBean(ex.message))
.bodyData(createMessageBean(message))
.bodyData(createMessageBean(ex.message))

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"))
}

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))

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