Skip to content

Add test that reproduces Runtime SDE bug.#731

Merged
mbeckerle merged 1 commit into
apache:mainfrom
mbeckerle:daf-2629-RSDE
Jan 24, 2022
Merged

Add test that reproduces Runtime SDE bug.#731
mbeckerle merged 1 commit into
apache:mainfrom
mbeckerle:daf-2629-RSDE

Conversation

@mbeckerle
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

@stevedlawrence stevedlawrence left a comment

Choose a reason for hiding this comment

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

+1

<sequence>
<annotation>
<appinfo source="http://www.ogf.org/dfdl/">
<dfdl:setVariable ref="f:someVar">{ dfdl:valueLength(someElement, "bytes") }
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.

If you use the value attribute for the expression does it still fail? Might be good to add a test for both syntaxes to make sure however this is resolved works for both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup. I added a test to verify this.

</dfdl:setVariable>
</appinfo>
</annotation>
</sequence>
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.

Is it worth added an inputValueCalc and/or outputValueCalc to ensure that the variable actually gets the right value? I could imagine a but where the SDE goes away but doesn't actually calculate the correct value and we wouldn't know.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a subsequent assertion that the variable gets value 4.

Copy link
Copy Markdown
Contributor

@tuxji tuxji left a comment

Choose a reason for hiding this comment

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

+1

val runner = Runner(testDir, "setVarWIthValueLength.tdml")

@AfterClass def shutDown() = {
runner.reset
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might want to add Unit after shutDown() and call reset() since it's also a Unit function (side-effect only).

@mbeckerle mbeckerle merged commit e977394 into apache:main Jan 24, 2022
@mbeckerle mbeckerle deleted the daf-2629-RSDE branch January 24, 2022 16:18
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