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-1686] Use a common executor for running check rules #142

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

Conversation

OptimumCode
Copy link
Member

No description provided.

cordwelt
cordwelt previously approved these changes Apr 29, 2022
README.md Outdated Show resolved Hide resolved
cordwelt
cordwelt previously approved these changes Feb 2, 2023
Comment on lines +352 to +357
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)}"
} ?: "")))
Copy link
Contributor

Choose a reason for hiding this comment

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

(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)}"
} ?: "")

May be build it using buildString instead?

Comment on lines +531 to +537
private fun messageTimeoutText(): String = "Check task was interrupted because the timestamp on the last processed message exceeds the message timeout. " +
(checkpointTimeout
?.toInstant()
?.let {
"Rule expects messages between $it and ${it.plusMillis(taskTimeout.messageTimeout)} " +
"but processed one outside this range. Check the messages attached to the root rule event to find all processed messages."
} ?: "But the message timeout is not specified. Contact the developers.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

!Drop this commit when rebasing on dev branch!
!task.hasNextRule().also { canBeRemoved ->
when {
canBeRemoved -> logger.info("Removed task ${task.description} ($endTime) from tasks map")
else -> logger.warn("Task ${task.description} can't be removed because it has a continuation")

Choose a reason for hiding this comment

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

Is this case warn? Maybe use debug log level for logging

@@ -0,0 +1,26 @@
/*
* Copyright 2022 Exactpro (Exactpro Systems Limited)

Choose a reason for hiding this comment

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

Suggested change
* Copyright 2022 Exactpro (Exactpro Systems Limited)
* Copyright 2023 Exactpro (Exactpro Systems Limited)

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.

3 participants