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

BUG: failing test_hierharchy_arraylist with jdk>=21 #736

Open
h-vetinari opened this issue Nov 19, 2024 · 0 comments
Open

BUG: failing test_hierharchy_arraylist with jdk>=21 #736

h-vetinari opened this issue Nov 19, 2024 · 0 comments
Labels

Comments

@h-vetinari
Copy link

When building pyjnius 1.6.1 against newer openjdk (21, 22) in conda-forge, things compile and run fine, with the exception of one test failure:

=================================== FAILURES ===================================
____________________ ReflectTest.test_hierharchy_arraylist _____________________

self = <test_reflect.ReflectTest testMethod=test_hierharchy_arraylist>

    def test_hierharchy_arraylist(self):
        d = identify_hierarchy_dict(find_javaclass("java.util.ArrayList"), 0, True)
        self.assertContains(d, "java.util.ArrayList")# concrete
        self.assertContains(d, "java.util.AbstractCollection")# superclass
        self.assertContains(d, "java.util.Collection")# interface
        self.assertContains(d, "java.lang.Iterable")# interface
        self.assertContains(d, "java.lang.Object")# root
        maxLevel = max(d.values())
>       self.assertEqual(d["java.lang.Object"], maxLevel)
E       AssertionError: 3 != 4

tests/test_reflect.py:38: AssertionError
=========================== short test summary info ============================
FAILED tests/test_reflect.py::ReflectTest::test_hierharchy_arraylist - AssertionError: 3 != 4
======================== 1 failed, 164 passed in 0.94s =========================

It seems all the expected hierarchy levels are still there, but either the hierarchy itself changed for real (meaning the test expectation is wrong), or the calculation in identify_hierarchy_dict needs to fix something to take into account the new reality.

@kuzeyron kuzeyron added the bug label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants