Project

General

Profile

Bug #7319

Fix adaptive query test suite from testcases

Added by Alexandru Lungu about 1 year ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Alexandru Lungu about 1 year ago

  • Assignee set to Ștefan Roman

The testcases/adaptive-scrolling test-suite is a reference point for our implementation of AdaptiveQuery. It includes several scenarios of invalidation/revalidation in single/multi table queries that are scrolling/non-scrolling.

The start points are adaptive-(noscroll|scroll)-harness.p, which run all the scroll/non-scroll adaptive query tests. These are only for temporary tables. AFAIK, there are some tests, which are failing for some time (prior to the recent FWD-H2 changes and persistence layer performance improvements). Therefore:

  • Run the tests in 4GL and extract adaptive-scroll-res.txt. Run the same tests in FWD and extract adaptive-scroll-res.txt. Check which tests are throwing an error (conversion/runtime) and comment them out. Report back with the mismatching tests. You can use Meld between files to easily navigate through differences.
  • Approach the failing tests and investigate the failing cause. Attempt to fix.
  • Reintroduce the tests which were throwing an error. Fix the tests which are failing conversion / fix FWD conversion for these tests.
  • Attempt to fix the new tests which are still failing at run-time.
  • Rewrite the tests to work with persistent database. AFAIK, Radu, you already have such work already done. Please commit to testcases the adaptive query test suite with persistent database and the required df. Use a "persistent-adaptive_tests" folder inside "adaptive_scrolling".
  • Retest with a persistent database (PostgreSQL and H2).

#2 Updated by Radu Apetrii about 1 year ago

Alexandru Lungu wrote:

AFAIK, Radu, you already have such work already done. Please commit to testcases the adaptive query test suite with persistent database and the required df. Use a "persistent-adaptive_tests" folder inside "adaptive_scrolling".

The persistent test-suite I currently have isn't that impressive. It still contains tests that fail to convert and/or fail at run-time.
Having that said, I will quickly change a few things and then I will commit the test-suite. I will get back with an update and a short note on which tests fail.

#3 Updated by Alexandru Lungu about 1 year ago

Radu Apetrii wrote:

Alexandru Lungu wrote:

AFAIK, Radu, you already have such work already done. Please commit to testcases the adaptive query test suite with persistent database and the required df. Use a "persistent-adaptive_tests" folder inside "adaptive_scrolling".

The persistent test-suite I currently have isn't that impressive. It still contains tests that fail to convert and/or fail at run-time.

This is idea. #7319 is meant to fix that issues.

#4 Updated by Radu Apetrii about 1 year ago

It is done. Inside adaptive_scrolling/persistent-adaptive_tests there are 2 folders (one for no-scrolling tests and one for scrolling tests) and a df file. The commit is on rev. 2377.
I had a quick look through the tests and found some problems that caught my eye:
  • The logic in the test needs to be redone so that the executed query finds a record instead of nothing:
    • Test 14 in adaptive_noscrolling folder
    • Tests 10 and 21 in adaptive_scrolling folder
  • Name of the table field(s) needs to change in order to match the field name from the df file. Valid field names can be found in Test 47-1 in adaptive_noscrolling folder.
    • Tests 47-12, 47-123, 47-13, 47-2, 47-23, 47-3 in adaptive_noscrolling folder
    • Tests 49-1, 49-12, 49-123, 49-13, 49-2, 49-23, 49-3 in adaptive_noscrolling folder
    • Tests 47-1, 47-12, 47-123, 47-13, 47-2, 47-23, 47-3 in adaptive_scrolling folder
    • Tests 49-1, 49-12, 49-123, 49-13, 49-2, 49-23, 49-3 in adaptive_scrolling folder
  • The field test2.g2 is an extent one, but it is not used correctly in these tests:
    • Tests 51 and 55 in adaptive_noscrolling folder
    • Test 51 in adaptive_scrolling folder

If I can help with anything else, please let me know.

#5 Updated by Alexandru Lungu about 1 year ago

Are these the issues for the persistent database? Are they the same as for temporary database?

#6 Updated by Radu Apetrii about 1 year ago

Alexandru Lungu wrote:

Are these the issues for the persistent database?

Yes, I forgot to mention. These issues are only for the persistent tests.

Are they the same as for temporary database?

No. The last two points from #7319-4 do not apply to the temporary database tests. Only the first one (where the logic needs to be reconsidered) has a chance to appear, but I haven't checked.

#7 Updated by Alexandru Lungu 12 months ago

Radu, can you post a patch here of the multi-table lazy fix? Maybe some of the tests are still failing because we disable invalidation of multi-table AdaptiveQuery.

#8 Updated by Radu Apetrii 12 months ago

Alexandru Lungu wrote:

Radu, can you post a patch here of the multi-table lazy fix? Maybe some of the tests are still failing because we disable invalidation of multi-table AdaptiveQuery.

Sure. To disable lazy for multi-table queries you need to go in AdaptiveQuery.isLazyMode (for me the line is 3501).
In there, the if statement needs to change from if (components null || components.size() < 1) to if (components null || components.size() != 1).

#9 Updated by Alexandru Lungu 9 months ago

  • Assignee changed from Ștefan Roman to Alexandru Lungu

Also available in: Atom PDF