[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928646#comment-16928646
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323791644
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -509,31 +509,47 @@ public void testExistingConnectionBlocking()
 }
 
 @Test
-public void testCreateValidation()
+public void testSelectorNumberMustBePositiveOnCreate()
 
 Review comment:
   I would like to suggest splitting positive and negative tests into separate 
methods
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928645#comment-16928645
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323797416
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -542,32 +558,50 @@ public void testCreateValidation()
 }
 
 @Test
-public void testChangeValidation()
+public void testSelectorNumberMustBePositiveOnChange()
 {
-QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "1"));
 try
 {
-virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "-1"));
-fail("Exception not thrown for negative number of selectors");
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnChange()
+{
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final Map vhAttributes = new HashMap<>();
+vhAttributes.put(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
1);
+vhAttributes.put(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, 1);
+virtualHost.setAttributes(vhAttributes);
 try
 {
-
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE,
-   "-1"));
-fail("Exception not thrown for negative connection thread pool 
size");
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE,
 "0"));
+fail("Exception not thrown for non-positive connection thread pool 
size");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testSelectorNumberMustBeLessOrEqualToThePoolSizeOnChange()
 
 Review comment:
   I would like to suggest splitting positive and negative tests into separate 
methods
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928643#comment-16928643
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323794957
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -509,31 +509,47 @@ public void testExistingConnectionBlocking()
 }
 
 @Test
-public void testCreateValidation()
+public void testSelectorNumberMustBePositiveOnCreate()
 {
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "1"));
 try
 {
-createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
-  "-1"));
-fail("Exception not thrown for negative number of selectors");
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnCreate()
+{
+final Map vhAttributes = new HashMap<>();
+vhAttributes.put(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
1);
+vhAttributes.put(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, 1);
+createVirtualHost(getTestName(), vhAttributes);
 try
 {
-createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
"-1"));
-fail("Exception not thrown for negative connection thread pool 
size");
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
"0"));
+fail("Exception not thrown for non-positive connection thread pool 
size");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testSelectorNumberMustBeLessOrEqualToThePoolSizeOnCreate()
 
 Review comment:
   I would like to suggest splitting positive and negative tests into separate 
methods
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928636#comment-16928636
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323796969
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -542,32 +558,50 @@ public void testCreateValidation()
 }
 
 @Test
-public void testChangeValidation()
+public void testSelectorNumberMustBePositiveOnChange()
 {
-QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "1"));
 try
 {
-virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "-1"));
-fail("Exception not thrown for negative number of selectors");
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnChange()
 
 Review comment:
   I would like to suggest splitting positive and negative tests into separate 
methods
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928640#comment-16928640
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323793431
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -509,31 +509,47 @@ public void testExistingConnectionBlocking()
 }
 
 @Test
-public void testCreateValidation()
+public void testSelectorNumberMustBePositiveOnCreate()
 {
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "1"));
 try
 {
-createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
-  "-1"));
-fail("Exception not thrown for negative number of selectors");
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnCreate()
 
 Review comment:
   Please, split method into positive and negative tests
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928638#comment-16928638
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323795956
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -542,32 +558,50 @@ public void testCreateValidation()
 }
 
 @Test
-public void testChangeValidation()
+public void testSelectorNumberMustBePositiveOnChange()
 
 Review comment:
   I would like to suggest splitting positive and negative tests into separate 
methods
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928639#comment-16928639
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323795243
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -509,31 +509,47 @@ public void testExistingConnectionBlocking()
 }
 
 @Test
-public void testCreateValidation()
+public void testSelectorNumberMustBePositiveOnCreate()
 {
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "1"));
 try
 {
-createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
-  "-1"));
-fail("Exception not thrown for negative number of selectors");
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnCreate()
+{
+final Map vhAttributes = new HashMap<>();
+vhAttributes.put(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
1);
+vhAttributes.put(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, 1);
+createVirtualHost(getTestName(), vhAttributes);
 try
 {
-createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
"-1"));
-fail("Exception not thrown for negative connection thread pool 
size");
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
"0"));
+fail("Exception not thrown for non-positive connection thread pool 
size");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testSelectorNumberMustBeLessOrEqualToThePoolSizeOnCreate()
+{
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, 
QueueManagingVirtualHost.DEFAULT_VIRTUALHOST_CONNECTION_THREAD_POOL_SIZE - 1));
 
 Review comment:
   The test can be strengthen with asserts verifying that specified values are 
indeed  set on the corresponding attributes
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928641#comment-16928641
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323797158
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -542,32 +558,50 @@ public void testCreateValidation()
 }
 
 @Test
-public void testChangeValidation()
+public void testSelectorNumberMustBePositiveOnChange()
 {
-QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "1"));
 try
 {
-virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "-1"));
-fail("Exception not thrown for negative number of selectors");
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnChange()
+{
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final Map vhAttributes = new HashMap<>();
+vhAttributes.put(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
1);
+vhAttributes.put(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, 1);
+virtualHost.setAttributes(vhAttributes);
 
 Review comment:
   The test can be strengthen with asserts verifying that specified values are 
indeed  set on the corresponding attributes
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928647#comment-16928647
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323794181
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -509,31 +509,47 @@ public void testExistingConnectionBlocking()
 }
 
 @Test
-public void testCreateValidation()
+public void testSelectorNumberMustBePositiveOnCreate()
 {
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "1"));
 try
 {
-createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
-  "-1"));
-fail("Exception not thrown for negative number of selectors");
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnCreate()
+{
+final Map vhAttributes = new HashMap<>();
+vhAttributes.put(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
1);
+vhAttributes.put(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, 1);
+createVirtualHost(getTestName(), vhAttributes);
 
 Review comment:
   The test can be strengthen with asserts verifying that specified values are 
indeed  set on the corresponding attributes
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928637#comment-16928637
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323792710
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -509,31 +509,47 @@ public void testExistingConnectionBlocking()
 }
 
 @Test
-public void testCreateValidation()
+public void testSelectorNumberMustBePositiveOnCreate()
 {
+createVirtualHost(getTestName(), 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "1"));
 
 Review comment:
   It make sense to verify that attribute "numberOfSelectors" is indeed set to 
the specified value, for example
   
   `Map attributes = 
Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "1");
   final QueueManagingVirtualHost vh = createVirtualHost(getTestName(), 
attributes);
   assertEquals(1, vh.getNumberOfSelectors());`
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928644#comment-16928644
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323797546
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -542,32 +558,50 @@ public void testCreateValidation()
 }
 
 @Test
-public void testChangeValidation()
+public void testSelectorNumberMustBePositiveOnChange()
 {
-QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "1"));
 try
 {
-virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, "-1"));
-fail("Exception not thrown for negative number of selectors");
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "0"));
+fail("Exception not thrown for non-positive number of selectors");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testConnectionThreadPoolSizeMustBePositiveOnChange()
+{
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final Map vhAttributes = new HashMap<>();
+vhAttributes.put(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE, 
1);
+vhAttributes.put(QueueManagingVirtualHost.NUMBER_OF_SELECTORS, 1);
+virtualHost.setAttributes(vhAttributes);
 try
 {
-
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE,
-   "-1"));
-fail("Exception not thrown for negative connection thread pool 
size");
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.CONNECTION_THREAD_POOL_SIZE,
 "0"));
+fail("Exception not thrown for non-positive connection thread pool 
size");
 }
 catch (IllegalConfigurationException e)
 {
 // pass
 }
+}
+
+@Test
+public void testSelectorNumberMustBeLessOrEqualToThePoolSizeOnChange()
+{
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 QueueManagingVirtualHost.DEFAULT_VIRTUALHOST_CONNECTION_THREAD_POOL_SIZE - 1));
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 QueueManagingVirtualHost.DEFAULT_VIRTUALHOST_CONNECTION_THREAD_POOL_SIZE));
 
 Review comment:
   The test can be strengthen with asserts verifying that specified values are 
indeed  set on the corresponding attributes
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928642#comment-16928642
 ] 

ASF GitHub Bot commented on QPID-7615:
--

alex-rufous commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34#discussion_r323796251
 
 

 ##
 File path: 
broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
 ##
 @@ -542,32 +558,50 @@ public void testCreateValidation()
 }
 
 @Test
-public void testChangeValidation()
+public void testSelectorNumberMustBePositiveOnChange()
 {
-QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+final QueueManagingVirtualHost virtualHost = 
createVirtualHost(getTestName());
+
virtualHost.setAttributes(Collections.singletonMap(QueueManagingVirtualHost.NUMBER_OF_SELECTORS,
 "1"));
 
 Review comment:
   The test can be strengthen with asserts verifying that specified values are 
indeed  set on the corresponding attributes
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16928380#comment-16928380
 ] 

ASF GitHub Bot commented on QPID-7615:
--

vavrtom commented on pull request #35: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/35
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-11 Thread Tomas Vavricka (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16927595#comment-16927595
 ] 

Tomas Vavricka commented on QPID-7615:
--

[~orudyy] fix is contained in pull requests 
[34|https://github.com/apache/qpid-broker-j/pull/34] and 
[35|https://github.com/apache/qpid-broker-j/pull/35].

> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16927591#comment-16927591
 ] 

ASF GitHub Bot commented on QPID-7615:
--

vavrtom commented on pull request #34: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/34
 
 
   Relates to master branch.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-7615) Cannot set number of selectors equal to pool size

2019-09-11 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/QPID-7615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16927592#comment-16927592
 ] 

ASF GitHub Bot commented on QPID-7615:
--

vavrtom commented on pull request #35: QPID-7615 Number of selectors can be 
equal to connection thread pool size
URL: https://github.com/apache/qpid-broker-j/pull/35
 
 
   Relates to 7.1.x branch.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot set number of selectors equal to pool size
> -
>
> Key: QPID-7615
> URL: https://issues.apache.org/jira/browse/QPID-7615
> Project: Qpid
>  Issue Type: Bug
>  Components: Broker-J
>Affects Versions: qpid-java-6.1.1
>Reporter: James Howe
>Priority: Minor
>
> For both Port and VirtualHost, the number of selectors is required to be 
> strictly less than the pool size.
> In particular, this means a pool size of 1 is not possible, as would be 
> desired for a minimal embedded/test configuration.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org