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

WFCORE-14 - add operations for manipulating list & map attributes #206

Merged
merged 1 commit into from
Oct 16, 2014

Conversation

ctomc
Copy link
Contributor

@ctomc ctomc commented Sep 29, 2014

initial version, i want do do some more cleanup of apis for easier manipulating on side of write/read attribute handlers

@wildfly-ci
Copy link

Linux Build 487 is now running using a merge of e147eb8

@wildfly-ci
Copy link

Windows Build 232 is now running using a merge of e147eb8

@wildfly-ci
Copy link

Windows Build 232 outcome was FAILURE using a merge of e147eb8
Summary: Tests failed: 10 (10 new), passed: 2590, ignored: 56 Build time: 0:13:19

Build problems:

Failed tests detected

Failed tests

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdministratorSensitiveAddressableResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMonitorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdminstratorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMaintainerNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadOperationNamesOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.RemoteChannelProxyControllerTestCase.testReadOperationNames: java.lang.AssertionError: expected:<11> but was:<19>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

@wildfly-ci
Copy link

Linux Build 487 outcome was FAILURE using a merge of e147eb8
Summary: Tests failed: 10 (10 new), passed: 2590, ignored: 56 Build time: 0:16:15

Build problems:

Failed tests detected

Failed tests

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdministratorSensitiveAddressableResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMonitorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdminstratorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMaintainerNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.RemoteChannelProxyControllerTestCase.testReadOperationNames: java.lang.AssertionError: expected:<11> but was:<19>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadOperationNamesOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

@wildfly-ci
Copy link

Windows Build 233 is now running using a merge of e147eb8

@wildfly-ci
Copy link

Linux Build 488 is now running using a merge of e147eb8

@wildfly-ci
Copy link

Linux Build 488 outcome was FAILURE using a merge of e147eb8
Summary: Tests failed: 10, passed: 2590, ignored: 56 Build time: 0:16:08

Build problems:

Failed tests detected

Failed tests

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdministratorSensitiveAddressableResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMonitorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdminstratorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMaintainerNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadOperationNamesOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.RemoteChannelProxyControllerTestCase.testReadOperationNames: java.lang.AssertionError: expected:<11> but was:<19>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

@wildfly-ci
Copy link

Windows Build 233 outcome was FAILURE using a merge of e147eb8
Summary: Execution timeout (new); tests failed: 10, passed: 2318, ignored: 43; org.wildfly.core:wildfly-core-testsuite-domain Build time: 0:30:09

Build problems:

Failed tests detected
Execution timeout
Process exited with code 1

Failed tests

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdministratorSensitiveAddressableResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMonitorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsAdminstratorNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.access.rbac.ReadOperationNamesRbacTestCase.testReadOperationNamesAsMaintainerNonSensitiveResource: java.lang.AssertionError: [map-clear, list-clear, map-put, list-get, map-get, list-remove, list-add, map-remove]
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.assertTrue(Assert.java:41)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsAliasesTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testRecursiveReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadOperationNamesOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.GlobalOperationsTestCase.testReadResourceDescriptionWithOperationsOperation: java.lang.AssertionError: expected:<12> but was:<20>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

org.jboss.as.controller.test.RemoteChannelProxyControllerTestCase.testReadOperationNames: java.lang.AssertionError: expected:<11> but was:<19>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)

@wildfly-ci
Copy link

Windows Build 234 is now running using a merge of e147eb8

@wildfly-ci
Copy link

Linux Build 489 is now running using a merge of e147eb8

@wildfly-ci
Copy link

Windows Build 235 is now running using a merge of 74160d0

@wildfly-ci
Copy link

Linux Build 490 is now running using a merge of 74160d0

@wildfly-ci
Copy link

Windows Build 235 outcome was SUCCESS using a merge of 74160d0
Summary: Tests passed: 2600, ignored: 56 Build time: 0:13:19

@wildfly-ci
Copy link

Linux Build 490 outcome was SUCCESS using a merge of 74160d0
Summary: Tests passed: 2600, ignored: 56 Build time: 0:16:14

@wildfly-ci
Copy link

Linux Build 491 is now running using a merge of 74160d0

@wildfly-ci
Copy link

Windows Build 236 is now running using a merge of 74160d0

@wildfly-ci
Copy link

Windows Build 236 outcome was SUCCESS using a merge of 74160d0
Summary: Tests passed: 2600, ignored: 56 Build time: 0:13:25

@wildfly-ci
Copy link

Linux Build 491 outcome was SUCCESS using a merge of 74160d0
Summary: Tests passed: 2600, ignored: 56 Build time: 0:16:09

public void updateModel(final OperationContext context, ModelNode model, ListAttributeDefinition attributeDefinition, ModelNode listAttribute) throws OperationFailedException {
ModelNode value = VALUE.resolveModelAttribute(context, model);
ModelNode index = INDEX.resolveModelAttribute(context, model);
List<ModelNode> res = new LinkedList<>(listAttribute.asList());
Copy link
Member

Choose a reason for hiding this comment

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

An ArrayList should perform better here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really sure about it, with arraylist it would mean copying array over on every remove.
for get operation arraylist is no brainier.

Copy link
Member

Choose a reason for hiding this comment

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

A LinkedList will use Collection.toArray() then create a new LinkedList.Node for each entry in the list. An ArrayList just copies the array with Collection.toArray(). Anyway, probably not a big deal. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah missed that one, we are stuck with array creation in any case :)

*/
public class ListOperations {

public static final OperationDefinition LIST_ADD_DEFINITION = new SimpleOperationDefinitionBuilder("list-add", new NonResolvingResourceDescriptionResolver())
Copy link
Contributor

Choose a reason for hiding this comment

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

These need descriptions, not NonResolvingResourceDescriptionResolver.

@wildfly-ci
Copy link

Windows Build 257 is now running using a merge of 68081fe

@wildfly-ci
Copy link

Linux Build 514 is now running using a merge of 68081fe

@wildfly-ci
Copy link

Windows Build 257 outcome was SUCCESS using a merge of 68081fe
Summary: Tests passed: 2601, ignored: 56 Build time: 0:13:42

@wildfly-ci
Copy link

Linux Build 514 outcome was SUCCESS using a merge of 68081fe
Summary: Tests passed: 2601, ignored: 56 Build time: 0:16:22

@bstansberry bstansberry added ready-for-merge This PR is ready to be merged and fulfills all requirements rebase-this This PR must be rebased before it is merged labels Oct 6, 2014
@wildfly-ci
Copy link

Linux Build 574 is now running using a merge of 0c4afe1

@wildfly-ci
Copy link

Windows Build 306 is now running using a merge of 0c4afe1

@wildfly-ci
Copy link

Windows Build 306 outcome was SUCCESS using a merge of 0c4afe1
Summary: Tests passed: 2603, ignored: 56 Build time: 0:13:51

@wildfly-ci
Copy link

Linux Build 574 outcome was SUCCESS using a merge of 0c4afe1
Summary: Tests passed: 2603, ignored: 56 Build time: 0:16:52

@wildfly-ci
Copy link

Windows Build 310 is now running using a merge of 1ba9b2f

@wildfly-ci
Copy link

Linux Build 578 is now running using a merge of 1ba9b2f

@wildfly-ci
Copy link

Windows Build 310 outcome was SUCCESS using a merge of 1ba9b2f
Summary: Tests passed: 2603, ignored: 56 Build time: 0:14:10

@wildfly-ci
Copy link

Linux Build 578 outcome was FAILURE using a merge of 1ba9b2f
Summary: Tests failed: 1 (1 new), passed: 2602, ignored: 56 Build time: 0:16:12

Build problems:

Failed tests detected

Failed tests

org.jboss.as.test.integration.domain.suspendresume.DomainGracefulShutdownTestCase.testGracefulShutdownDomainLevel: java.io.IOException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:202)

@bstansberry bstansberry removed the rebase-this This PR must be rebased before it is merged label Oct 15, 2014
@bstansberry
Copy link
Contributor

retest this please

@wildfly-ci
Copy link

Windows Build 321 is now running using a merge of 1ba9b2f

@wildfly-ci
Copy link

Linux Build 593 is now running using a merge of 1ba9b2f

@wildfly-ci
Copy link

Windows Build 321 outcome was SUCCESS using a merge of 1ba9b2f
Summary: Tests passed: 2687, ignored: 56 Build time: 0:14:14

@wildfly-ci
Copy link

Linux Build 593 outcome was SUCCESS using a merge of 1ba9b2f
Summary: Tests passed: 2687, ignored: 56 Build time: 0:17:01

bstansberry added a commit that referenced this pull request Oct 16, 2014
WFCORE-14 - add operations for manipulating list & map attributes
@bstansberry bstansberry merged commit d4e3c92 into wildfly:master Oct 16, 2014
iweiss pushed a commit to iweiss/wildfly-core that referenced this pull request Jun 6, 2016
[WFCORE-1442] Remove -XX:MaxMetaspaceSize=256m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
4 participants