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
Allow enum members to define functions #22281
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for your contribution! Can you please add tests covering the fix? |
(btw. it's too late for this to be in 5.2, maybe it will make it to 5.3 :) ) |
tests added. |
LGTM, Asked for additional review from Core & SQL team members |
run-lab-run |
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Errors: [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.... [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.... [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.... [ERROR] CacheConfigConstructorTest.testConstructor:44 ? Guardian java.lang.NoSuchMetho... [ERROR] ConfigConstructorTest.testConstructor:50 ? Guardian java.lang.NoSuchMethodExce... [ERROR] DynamicConfigurationAwareConfigConstructorTest.testConstructor:57 ? Guardian j... [INFO] [ERROR] Tests run: 50917, Failures: 0, Errors: 6, Skipped: 238 [INFO] |
run-lab-run |
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Errors: [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.... [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.... [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.... [ERROR] CacheConfigConstructorTest.testConstructor:44 ? Guardian java.lang.NoSuchMetho... [ERROR] ConfigConstructorTest.testConstructor:50 ? Guardian java.lang.NoSuchMethodExce... [ERROR] DynamicConfigurationAwareConfigConstructorTest.testConstructor:57 ? Guardian j... [INFO] [ERROR] Tests run: 50926, Failures: 0, Errors: 6, Skipped: 238 [INFO] |
run-lab-run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the awesome fix @mwashburn , added one minor comment.
@@ -97,6 +97,17 @@ public void constructor_whenModifierIsPositionAndMethodReturnTypeIsCollection_th | |||
new MethodGetter(null, limbCollectionMethod, "[0]", null); | |||
} | |||
|
|||
@Test | |||
public void getValue_whenFieldIsEnum() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the motivation for this test? It is not failing with current master
and it does not test MethodGetter
with enum elements, but maybe I 'm missing something?
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Failures: [ERROR] CacheClientListenerTest>CacheListenerTest.testSyncListener:110 Cache operations have not finished in 130 seconds when sync listener is present! [ERROR] Errors: [ERROR] CacheClientListenerTest>CacheListenerTest.testPutIfAbsentWithSyncListener_whenEntryExists:120->getCachingProvider:64 ? TestTimedOut test timed out after 30000 milliseconds [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.OnJoinPermissionOperationName.() [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.OnJoinPermissionOperationName.() [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.OnJoinPermissionOperationName.() [ERROR] CacheConfigConstructorTest.testConstructor:44 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.MaxSizePolicy.() [ERROR] ConfigConstructorTest.testConstructor:50 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.MaxSizePolicy.() [ERROR] DynamicConfigurationAwareConfigConstructorTest.testConstructor:57 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.MaxSizePolicy.() [INFO] [ERROR] Tests run: 51002, Failures: 1, Errors: 7, Skipped: 238 [INFO] |
run-lab-run |
The job Click to expand the log file-------------------------- -------TEST FAILURE------- -------------------------- [INFO] Results: [INFO] [ERROR] Failures: [ERROR] ClientMapPartitionLostListenerTest.test_mapPartitionLostListener_invoked_fromOtherNode:133->assertProxyExistsEventually:163->HazelcastTestSupport.assertTrueEventually:1338->HazelcastTestSupport.assertTrueEventually:1236 There is no proxy with name f4788131-63dc-41d5-bb5c-793faf3afab0 created (yet) [ERROR] MetadataRaftGroupTest.when_cpSubsystemReset_then_cpGroupIsCreatedWithDifferentGroupId:705->HazelcastRaftTestSupport.waitUntilCPDiscoveryCompleted:91->HazelcastTestSupport.assertTrueEventually:1338->HazelcastTestSupport.assertTrueEventually:1236->HazelcastRaftTestSupport.lambda$waitUntilCPDiscoveryCompleted$1:93 [ERROR] Errors: [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.OnJoinPermissionOperationName.() [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.OnJoinPermissionOperationName.() [ERROR] ProcessorClassLoaderTest.setUp:113->createHazelcastMember:139 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.OnJoinPermissionOperationName.() [ERROR] CacheConfigConstructorTest.testConstructor:44 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.InMemoryFormat.() [ERROR] ConfigConstructorTest.testConstructor:50 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.MetadataPolicy.() [ERROR] DynamicConfigurationAwareConfigConstructorTest.testConstructor:57 ? Guardian java.lang.NoSuchMethodException: com.hazelcast.config.MapStoreConfig$InitialLoadMode.() [INFO] [ERROR] Tests run: 51002, Failures: 2, Errors: 6, Skipped: 238 [INFO] |
Hi @mwashburn, thank you for the contribution. Would it be possible to rebase the PR with latest |
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Enums which have method implementations cannot be used in queries.
Fixes: #21800
Partially Fixes #8305
Breaking changes (list specific methods/types/messages):
Queries that used to throw exceptions will now work.