Skip to content

fix: Bug in commandExecutor: .preliminary does not work (SOFIE-4069) #381

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

Open
wants to merge 2 commits into
base: release52
Choose a base branch
from

Conversation

nytamin
Copy link
Member

@nytamin nytamin commented Jul 1, 2025

About the Contributor

This pull request is posted on behalf of the NRK

Type of Contribution

This is a: Bug fix

Current Behavior

The CommandExecutor did not execute commands properly if the .preliminary property was set.

// If multiple commands had different preliminary set:
const commandExecutor = new CommandExecutor(logger, 'salvo', sendCommand)
await commandExecutor.executeCommands([
	{ command: 'A0' },
	{ command: 'A1' },
	{ command: 'A-p200', preliminary: 200 },
	{ command: 'A-p500', preliminary: 500 },
])
// Expected result:
executedTimes = {
	'A-p500': 0,
	'A-p200': 300,
	A0: 500,
	A1: 500
}
// Actual result:
executedTimes = {
	'A-p500': 0,
	'A-p200': 500,
	A0: 500,
	A1: 500
}

New Behavior

(Added unit tests to verify that) CommandExectur now executes commands as expected.

Testing Instructions

Currently only the Quantel device uses the preliminary property, so testing with respect to Quantel playout is prudent.

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@nytamin nytamin requested a review from a team July 1, 2025 05:46
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...line-state-resolver/src/service/commandExecutor.ts 86.95% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jstarpl jstarpl changed the title Bug in commandExecutor: .preliminary does not work (SOFIE-4069) fix: Bug in commandExecutor: .preliminary does not work (SOFIE-4069) Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants