[JBoss JIRA] (ISPN-10389) Refactor the test HTTP client
by Tristan Tarrant (Jira)
[ https://issues.jboss.org/browse/ISPN-10389?page=com.atlassian.jira.plugin... ]
Tristan Tarrant updated ISPN-10389:
-----------------------------------
Status: Open (was: New)
> Refactor the test HTTP client
> -----------------------------
>
> Key: ISPN-10389
> URL: https://issues.jboss.org/browse/ISPN-10389
> Project: Infinispan
> Issue Type: Enhancement
> Components: Remote Protocols, REST, Test Suite - Server
> Affects Versions: 10.0.0.Beta3
> Reporter: Tristan Tarrant
> Assignee: Tristan Tarrant
> Priority: Major
> Fix For: 10.0.0.Beta4
>
>
> The REST server testsuite includes an HTTP client which could eventually be reused in many places (CLI, Rest Cache Store, Server testsuite).
> Before promoting it to a public module (i.e. non-test) we can improve its usability by making it configurable, automatically selecting configuration modes, etc.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 3 months
[JBoss JIRA] (HRJS-79) Registering listener with undefined listenerId does nothing
by Galder Zamarreño (Jira)
[ https://issues.jboss.org/browse/HRJS-79?page=com.atlassian.jira.plugin.sy... ]
Galder Zamarreño updated HRJS-79:
---------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 0.7.0
Resolution: Done
> Registering listener with undefined listenerId does nothing
> -----------------------------------------------------------
>
> Key: HRJS-79
> URL: https://issues.jboss.org/browse/HRJS-79
> Project: Infinispan Javascript client
> Issue Type: Bug
> Reporter: Anna Manukyan
> Assignee: Anna Manukyan
> Priority: Major
> Fix For: 0.7.0
>
>
> I was trying the following scenario: the case when the listenerId is passed while adding new listeners.
> I was creating 3 listeners for create,modify and remove events. While adding listeners for modify and remove events I was passing the listenerId, but for modify event the listenerId was some nonexistent string.
> I was curious what will happen. From the functional side nothing happened, so the modify event is not fired and from the logs I can see the following:
> {code}
> [2018-09-25T22:24:55.845] [DEBUG] client - Invoke addListener(msgId=464,event=create,listenerId=listener_465,opts=undefined) remotely
> [2018-09-25T22:24:55.845] [TRACE] encoder - Encode operation with topology id 0
> [2018-09-25T22:24:55.846] [TRACE] listener - Create listener emitter for connection 127.0.0.1:11222@conn_15 and listener with listenerId=listener_465
> [2018-09-25T22:24:55.846] [TRACE] io_7 - Write buffer(msgId=464) to 127.0.0.1:11222@conn_15: A0D0031D2500000300010D00010D000C6C697374656E65725F343635000000000F
> [2018-09-25T22:24:55.847] [TRACE] decoder - Read header(msgId=464): opCode=38, status=0, hasNewTopology=0
> [2018-09-25T22:24:55.847] [TRACE] decoder - Call decode for request(msgId=464)
> [2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - Complete success for request(msgId=464) with true
> [2018-09-25T22:24:55.847] [TRACE] io_7_conn_15 - After decoding request(msgId=464), buffer size is 6, and offset 6
> [2018-09-25T22:24:55.847] [DEBUG] client - Invoke addListener(msgId=466,event=modify,opts={"listenerId":"blblbl"}) locally
> {color:red}[2018-09-25T22:24:55.848] [TRACE] listener - Create listener emitter for connection undefined and listener with listenerId=blblbl{color}
> [2018-09-25T22:24:55.848] [DEBUG] client - Invoke addListener(msgId=467,event=remove,opts={"listenerId":"listener_465"}) locally
> {code}
> So the first line creates "create" event listener remotely. For the "modify" and "delete" events the "addLocalListener()" function is called. I am worried about the line marked in red, there the connection is passed as {color:red}undefined{color}.
> I have found out that the connection parameter is not passed to protocol's addListener function when it is called from addLocalListener() function, but couldn't find a way to fix that.
> Should it be that way?
> I know that this kind of scenario is hardly possible but just in case the developer did some mistake, perhaps he/she may spend much time on finding why the event is not fired.
> The code for generating this log is given here:
> {code}
> ...code in the test...
> it('fails when trying to attach to non-existent listener', function(done) {
> client.then(function (client) {
> var clientAddListenerCreate = client.addListener(
> 'create', function(key) { console.log('[Event] Created key: ' + key); });
> var clientAddListeners = clientAddListenerCreate.then(
> function(listenerId) {
> // Multiple callbacks can be associated with a single client-side listener.
> // This is achieved by registering listeners with the same listener id
> // as shown in the example below.
> var clientAddListenerModify = client.addListener(
> 'modify', function(key) { console.log('[Event] Modified key: ' + key); },
> {listenerId: 'blblbl'});
> var clientAddListenerRemove = client.addListener(
> 'remove', function(key) { console.log('[Event] Removed key: ' + key); },
> {listenerId: listenerId});
> return Promise.all([clientAddListenerModify, clientAddListenerRemove]);
> });
> var clientCreate = clientAddListeners.then(
> function() { return client.putIfAbsent('eventful', 'v0'); });
> var clientModify = clientCreate.then(
> function() { return client.replace('eventful', 'v1'); });
> var clientRemove = clientModify.then(
> function() { return client.remove('eventful'); });
> var clientRemoveListener =
> Promise.all([clientAddListenerCreate, clientRemove]).then(
> function(values) {
> var listenerId = values[0];
> return client.removeListener(listenerId);
> });
> }).catch(t.failed(done)).finally(done);
> });
> ........
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 3 months
[JBoss JIRA] (ISPN-10389) Refactor the test HTTP client
by Tristan Tarrant (Jira)
Tristan Tarrant created ISPN-10389:
--------------------------------------
Summary: Refactor the test HTTP client
Key: ISPN-10389
URL: https://issues.jboss.org/browse/ISPN-10389
Project: Infinispan
Issue Type: Enhancement
Components: Remote Protocols, REST, Test Suite - Server
Affects Versions: 10.0.0.Beta3
Reporter: Tristan Tarrant
Assignee: Tristan Tarrant
Fix For: 10.0.0.Beta4
The REST server testsuite includes an HTTP client which could eventually be reused in many places (CLI, Rest Cache Store, Server testsuite).
Before promoting it to a public module (i.e. non-test) we can improve its usability by making it configurable, automatically selecting configuration modes, etc.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 3 months
[JBoss JIRA] (ISPN-9772) Cache v2 Resource
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9772?page=com.atlassian.jira.plugin.... ]
Ryan Emerson updated ISPN-9772:
-------------------------------
Component/s: REST
> Cache v2 Resource
> -----------------
>
> Key: ISPN-9772
> URL: https://issues.jboss.org/browse/ISPN-9772
> Project: Infinispan
> Issue Type: Sub-task
> Components: REST
> Affects Versions: 10.0.0.Beta3
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Priority: Major
> Fix For: 10.0.0.Beta4
>
>
> The new cache resource should include most of operations in the current v1 resource, plus:
> * Possibility to create a cache passing a configuration
> * Possibility to obtain the cache configuration
> * Extra operations:
> -* Stop cache (clustered or not)
> -* Disable a cache temporarily
> -* Obtain stats about the cache
> -* Efficient cache entry iteration, with or without keys
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 3 months
[JBoss JIRA] (ISPN-9772) Cache v2 Resource
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9772?page=com.atlassian.jira.plugin.... ]
Ryan Emerson updated ISPN-9772:
-------------------------------
Affects Version/s: 10.0.0.Beta3
> Cache v2 Resource
> -----------------
>
> Key: ISPN-9772
> URL: https://issues.jboss.org/browse/ISPN-9772
> Project: Infinispan
> Issue Type: Sub-task
> Affects Versions: 10.0.0.Beta3
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Priority: Major
> Fix For: 10.0.0.Beta4
>
>
> The new cache resource should include most of operations in the current v1 resource, plus:
> * Possibility to create a cache passing a configuration
> * Possibility to obtain the cache configuration
> * Extra operations:
> -* Stop cache (clustered or not)
> -* Disable a cache temporarily
> -* Obtain stats about the cache
> -* Efficient cache entry iteration, with or without keys
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 3 months
[JBoss JIRA] (ISPN-9772) Cache v2 Resource
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/ISPN-9772?page=com.atlassian.jira.plugin.... ]
Ryan Emerson resolved ISPN-9772.
--------------------------------
Fix Version/s: 10.0.0.Beta4
Resolution: Done
> Cache v2 Resource
> -----------------
>
> Key: ISPN-9772
> URL: https://issues.jboss.org/browse/ISPN-9772
> Project: Infinispan
> Issue Type: Sub-task
> Affects Versions: 10.0.0.Beta3
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Priority: Major
> Fix For: 10.0.0.Beta4
>
>
> The new cache resource should include most of operations in the current v1 resource, plus:
> * Possibility to create a cache passing a configuration
> * Possibility to obtain the cache configuration
> * Extra operations:
> -* Stop cache (clustered or not)
> -* Disable a cache temporarily
> -* Obtain stats about the cache
> -* Efficient cache entry iteration, with or without keys
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 3 months