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

Unit test RFC_ENABLED in Y_CHECK_FUNCTION fails #526

Closed
ConjuringCoffee opened this issue Nov 10, 2021 · 5 comments · Fixed by #531 or #529
Closed

Unit test RFC_ENABLED in Y_CHECK_FUNCTION fails #526

ConjuringCoffee opened this issue Nov 10, 2021 · 5 comments · Fixed by #531 or #529
Assignees
Labels
bug Something isn't working correctly

Comments

@ConjuringCoffee
Copy link
Contributor

ConjuringCoffee commented Nov 10, 2021

The unit test method RFC_ENABLED of class Y_CHECK_FUNCTION fails. It expects an initial value for cut->get_statistics( )->count-notes, but it contains the number 3.

I'm running the tests of commit c782c26 on an S/4 system with component SAP_BASIS release 755 SP-Level 0002. Can anyone confirm if the test runs successfully on older releases?

@ConjuringCoffee ConjuringCoffee added the bug Something isn't working correctly label Nov 10, 2021
@ConjuringCoffee ConjuringCoffee changed the title Unit test RFC_ENABLED of class Y_CHECK_FUNCTION fails Unit test RFC_ENABLED in Y_CHECK_FUNCTION fails Nov 10, 2021
@lucasborin
Copy link
Member

Tested on SAP_BASIS 757/0000:
image

There is a database dependency on the unit test that may be the root cause:
SELECT SINGLE pname FROM tfdir INTO @DATA(function_group) WHERE fmode = 'R'.

@ConjuringCoffee
Copy link
Contributor Author

Looks like it checks the source code from the first remote function that is found in the database. For me, that's function group /BSNAGT/SAPLF_DISPLAY_CONTENT. Maybe the author had another function group for which it coincidentally worked.

@lucasborin lucasborin self-assigned this Nov 10, 2021
@lucasborin
Copy link
Member

lucasborin commented Nov 10, 2021

Hm. In the sandbox system I use to develop code pal, it works:
image

Yeah, again, I bet it is related to the database dependency.

"It works on my machine...."
¯_(ツ)_/¯ haha.

@ConjuringCoffee
Copy link
Contributor Author

Which function group is checked on your system?

@lucasborin
Copy link
Member

I found the root cause. The test helper looks for an FG that has at least one FM with the RFC enabled, but the UT expects that the first FM from the FG is the one with the RFC enabled.

lucasborin pushed a commit that referenced this issue Nov 11, 2021
lucasborin added a commit that referenced this issue Nov 11, 2021
* fixes #526

* changelog

* Start statement at tab position

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>
This was linked to pull requests Nov 11, 2021
lucasborin added a commit that referenced this issue Nov 11, 2021
* updating changelog

* new version

* Removing Service (#530)

* solves #524

* changelog

* removing it from the documentation

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>

* Refactoring Function Check (#531)

* fixes #526

* changelog

* Start statement at tab position

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>

* SUT Dependency (#533)

* forcing cspell to track sut dependencies

* changelog

* fixing #527

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>

* changelog

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>
ghost pushed a commit that referenced this issue Feb 18, 2022
* updating changelog

* new version

* Removing Service (#530)

* solves #524

* changelog

* removing it from the documentation

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>

* Refactoring Function Check (#531)

* fixes #526

* changelog

* Start statement at tab position

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>

* SUT Dependency (#533)

* forcing cspell to track sut dependencies

* changelog

* fixing #527

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>

* changelog

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update y_check_function.clas.abap

* Update y_check_function.clas.abap

* Update src/checks/y_check_function.clas.abap

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* Update src/checks/y_check_function.clas.abap

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* Update y_check_function.clas.abap

Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.com>
Co-authored-by: Lucas Borin <5233413+lucasborin@users.noreply.github.co>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants