From 7a2d3483fbfae636e20c67b1161c0ca956a8a1c6 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Fri, 10 Mar 2017 20:11:50 +0530 Subject: [PATCH 01/21] Publish improvementsfor Go 1.8 --- messaging/pubnub.go | 140 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 133 insertions(+), 7 deletions(-) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index 09d0ca4c..a510a7cd 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -1,6 +1,6 @@ // Package messaging provides the implemetation to connect to pubnub api. -// Version: 3.10.0 -// Build Date: Feb 22, 2016 +// Version: 3.11.0 +// Build Date: Mar 10, 2017 package messaging import ( @@ -15,8 +15,12 @@ import ( "encoding/json" "errors" "fmt" + "golang.org/x/net/context" + "golang.org/x/time/rate" + "io" "io/ioutil" "log" + "net" "net/http" "net/url" "reflect" @@ -29,9 +33,9 @@ import ( const ( // SDK_VERSION is the current SDK version - SDK_VERSION = "3.10.0" + SDK_VERSION = "3.11.0" // SDK_DATE is the version release date - SDK_DATE = "Feb 22, 2016" + SDK_DATE = "Mar 10, 2017" ) type responseStatus int @@ -299,8 +303,10 @@ type Pubnub struct { presenceHeartbeatWorker *requestWorker nonSubscribeWorker *requestWorker retryWorker *requestWorker - - infoLogger *log.Logger + publishHTTPClient *http.Client + limiter *rate.Limiter + ctx context.Context + infoLogger *log.Logger } // PubnubUnitTest structure used to expose some data for unit tests. @@ -389,10 +395,45 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK newPubnub.nonSubscribeWorker = newRequestWorker("Non-Subscribe", nonSubscribeTransport, nonSubscribeTimeout, newPubnub.infoLogger) newPubnub.retryWorker = newRequestWorker("Retry", retryTransport, retryInterval, newPubnub.infoLogger) + newPubnub.publishHTTPClient = createPublishHTTPClient() + newPubnub.limiter = rate.NewLimiter(20, 10) + newPubnub.ctx = context.Background() return newPubnub } +func createPublishHTTPClient() *http.Client { + client := &http.Client{ + Transport: &http.Transport{ + MaxIdleConnsPerHost: maxIdleConnsPerHost, + Dial: (&net.Dialer{ + Timeout: time.Duration(connectTimeout) * time.Second, + KeepAlive: 30 * time.Minute, + }).Dial, + }, + + Timeout: time.Duration(nonSubscribeTimeout) * time.Second, + } + + /*transport.ResponseHeaderTimeout = time.Duration(w.Timeout) * time.Second + + if proxyServerEnabled { + proxyURL, err := url.Parse(fmt.Sprintf("http://%s:%s@%s:%d", proxyUser, + proxyPassword, proxyServer, proxyPort)) + + if err == nil { + transport.Proxy = http.ProxyURL(proxyURL) + } else { + w.InfoLogger.Printf("ERROR: %s: Proxy connection error: %s", w.Name, err.Error()) + } + } + + transport.MaxIdleConnsPerHost = maxIdleConnsPerHost + w.Transport = transport*/ + + return client +} + // SetMaxIdleConnsPerHost is used to set the value of HTTP Transport's MaxIdleConnsPerHost. // It restricts how many connections there are which are not actively serving requests, but which the client has not closed. // Be careful when increasing MaxIdleConnsPerHost to a large number. It only makes sense to increase idle connections if you are seeing many connections in a short period from the same clients. @@ -1173,7 +1214,7 @@ func (pub *Pubnub) sendPublishRequest(channel, publishURLString string, publishURL = fmt.Sprintf("%s&meta=%s", publishURL, metaEncodedPath) } - value, responseCode, err := pub.httpRequest(publishURL, nonSubscribeTrans) + value, responseCode, err := pub.publishHTTPRequest(publishURL) pub.readPublishResponseAndCallSendResponse(channel, value, responseCode, err, callbackChannel, errorChannel) } @@ -4109,6 +4150,90 @@ func (pub *Pubnub) httpRequest(requestURL string, tType transportType) ( return contents, responseStatusCode, err } +/*func (pub *Pubnub) validateRequestAndAddHeaders(requestURL string) *http.Request { + req, err := http.NewRequest("GET", requestURL, nil) + if err != nil { + //msg := []byte(fmt.Sprintf("Error Occured. %+v", err)) + pub.infoLogger.Printf("ERROR: HTTP REQUEST: Error while creating request: %s", err.Error()) + //ph.publishErrorChannel <- msg + return nil, 0, err + } + + scheme := "http" + if pub.isSSL { + scheme = "https" + } + + req.URL = &url.URL{ + Scheme: scheme, + Host: origin, + Opaque: fmt.Sprintf("//%s%s", origin, requestURL), + } + + // REVIEW: hardcoded client version + useragent := fmt.Sprintf("ua_string=(%s) PubNub-Go/%s", runtime.GOOS, + SDK_VERSION) + + req.Header.Set("User-Agent", useragent) + return req +}*/ + +func (pub *Pubnub) publishHTTPRequest(requestURL string) ( + []byte, int, error) { + if err := pub.limiter.Wait(pub.ctx); err != nil { + pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Limiter: %s", err.Error()) + return nil, 0, err + } + //req := pub.validateRequestAndAddHeaders(requestURL) + req, err := http.NewRequest("GET", requestURL, nil) + if err != nil { + //msg := []byte(fmt.Sprintf("Error Occured. %+v", err)) + pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while creating request: %s", err.Error()) + //ph.publishErrorChannel <- msg + return nil, 0, err + } + + scheme := "http" + if pub.isSSL { + scheme = "https" + } + + req.URL = &url.URL{ + Scheme: scheme, + Host: origin, + Opaque: fmt.Sprintf("//%s%s", origin, requestURL), + } + + // REVIEW: hardcoded client version + useragent := fmt.Sprintf("ua_string=(%s) PubNub-Go/%s", runtime.GOOS, + SDK_VERSION) + + req.Header.Set("User-Agent", useragent) + + response, err := pub.publishHTTPClient.Do(req) + if err != nil && response == nil { + pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while sending request: %s", err.Error()) + //msg := []byte(fmt.Sprintf("Error sending request to API endpoint. %+v", err)) + //ph.publishErrorChannel <- msg + return nil, 0, err + } + + //defer + body, err := ioutil.ReadAll(response.Body) + if err != nil { + pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while parsing body: %s", err.Error()) + //msg := []byte(fmt.Sprintf("Couldn't parse response body. %+v", err)) + //ph.publishErrorChannel <- msg + response.Body.Close() + return nil, response.StatusCode, err + } + io.Copy(ioutil.Discard, response.Body) + response.Body.Close() + + return body, response.StatusCode, nil + //ph.publishSuccessChannel <- body +} + // connect creates a http request to the pubnub origin and returns the // response or the error while connecting. // @@ -4146,6 +4271,7 @@ func (pub *Pubnub) connect(requestURL string, tType transportType, SDK_VERSION) req.Header.Set("User-Agent", useragent) + //req := pub.validateRequestAndAddHeaders(requestURL) switch tType { case subscribeTrans: From 618955ea0c1978ba46d3d057c36862c895fed99c Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Fri, 10 Mar 2017 20:24:01 +0530 Subject: [PATCH 02/21] updated maxidle connections default --- messaging/pubnub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index a510a7cd..5bbf9a1e 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -236,7 +236,7 @@ var ( proxyServerEnabled = false // Used to set the value of HTTP Transport's MaxIdleConnsPerHost. - maxIdleConnsPerHost = 2 + maxIdleConnsPerHost = 70 ) // VersionInfo returns the version of the this code along with the build date. From 0aab372dea8b9cf37e48890a60cbf0a3b5cbe079 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Fri, 10 Mar 2017 21:03:17 +0530 Subject: [PATCH 03/21] Version bump --- .pubnub.yml | 4 +- README.md | 6 +- VERSION | 2 +- gae-example/README.md | 2 +- gae-managed-vm-example/README.md | 2 +- gae/messaging/pubnub.go | 8 +-- messaging/README.md | 4 +- messaging/pubnub_test.go | 8 +-- .../groups/addRemove_NonSubscribe.yaml | 16 ++--- .../alreadySubscribed_NonSubscribe.yaml | 12 ++-- .../groups/alreadySubscribed_Subscribe.yaml | 10 ++-- .../conAndUnsMultiple_NonSubscribe.yaml | 28 ++++----- .../groups/conAndUnsMultiple_Subscribe.yaml | 6 +- .../groups/conAndUnsSingle_NonSubscribe.yaml | 12 ++-- .../groups/conAndUnsSingle_Subscribe.yaml | 6 +- .../groups/notExistingCG_NonSubscribe.yaml | 8 +-- .../groups/notExistingCG_Subscribe.yaml | 4 +- .../groups/notSubscribed_NonSubscribe.yaml | 8 +-- .../receiveSingleMessage_NonSubscribe.yaml | 16 ++--- .../receiveSingleMessage_Subscribe.yaml | 10 ++-- ...ryFor10EncryptedMessages_NonSubscribe.yaml | 44 +++++++------- .../historyFor10Messages_NonSubscribe.yaml | 44 +++++++------- ...msFor10EncryptedMessages_NonSubscribe.yaml | 60 +++++++++---------- ...storyParamsFor10Messages_NonSubscribe.yaml | 60 +++++++++---------- .../history/withTimetoken_NonSubscribe.yaml | 44 +++++++------- ...okeChannelLevelSubscribe_NonSubscribe.yaml | 8 +-- ...vokeSubKeyLevelSubscribe_NonSubscribe.yaml | 8 +-- ...elLevelSubscribeWithAuth_NonSubscribe.yaml | 4 +- .../presence/customUuid_NonSubscribe.yaml | 8 +-- .../presence/customUuid_Subscribe.yaml | 6 +- .../presence/globalWhereNow_NonSubscribe.yaml | 8 +-- .../presence/globalWhereNow_Subscribe.yaml | 6 +- .../setGetUserState_NonSubscribe.yaml | 12 ++-- .../presence/setGetUserState_Subscribe.yaml | 8 +-- ...etUserStateGlobalHereNow_NonSubscribe.yaml | 12 ++-- .../setUserStateGlobalHereNow_Subscribe.yaml | 8 +-- .../setUserStateHereNow_NonSubscribe.yaml | 12 ++-- .../setUserStateHereNow_Subscribe.yaml | 8 +-- .../setUserStateJSON_NonSubscribe.yaml | 8 +-- .../presence/whereNow_NonSubscribe.yaml | 8 +-- .../fixtures/presence/whereNow_Subscribe.yaml | 6 +- .../presence/zeroPresence_NonSubscribe.yaml | 8 +-- .../presence/zeroPresence_Subscribe.yaml | 24 ++++---- .../fixtures/publish/fire_NonSubscribe.yaml | 8 +-- ...hStringWithSerialization_NonSubscribe.yaml | 8 +-- ...lishStringWithSerialization_Subscribe.yaml | 10 ++-- ...ringWithoutSerialization_NonSubscribe.yaml | 8 +-- ...hStringWithoutSerialization_Subscribe.yaml | 10 ++-- ...blishWithReplicateAndTTL_NonSubscribe.yaml | 8 +-- .../publishWithReplicate_NonSubscribe.yaml | 8 +-- ...exMessage2WithEncryption_NonSubscribe.yaml | 4 +- ...ndInfoForComplexMessage2_NonSubscribe.yaml | 4 +- ...AndInfoForComplexMessage_NonSubscribe.yaml | 4 +- ...odeAndInfoWithEncryption_NonSubscribe.yaml | 4 +- .../successCodeAndInfo_NonSubscribe.yaml | 4 +- .../alreadySubscribed_NonSubscribe.yaml | 8 +-- .../alreadySubscribed_Subscribe.yaml | 10 ++-- .../connectMultipleStatus_NonSubscribe.yaml | 4 +- .../connectMultipleStatus_Subscribe.yaml | 6 +- .../subscribe/connectStatus_NonSubscribe.yaml | 4 +- .../subscribe/connectStatus_Subscribe.yaml | 6 +- ...ComplexMessageWithCipher_NonSubscribe.yaml | 8 +-- ...forComplexMessageWithCipher_Subscribe.yaml | 10 ++-- .../forComplexMessage_NonSubscribe.yaml | 8 +-- .../forComplexMessage_Subscribe.yaml | 10 ++-- .../forMessageFiltering2_NonSubscribe.yaml | 8 +-- .../forMessageFiltering2_Subscribe.yaml | 6 +- .../forMessageFiltering_NonSubscribe.yaml | 8 +-- .../forMessageFiltering_Subscribe.yaml | 10 ++-- ...rSimpleMessageWithCipher_NonSubscribe.yaml | 8 +-- .../forSimpleMessageWithCipher_Subscribe.yaml | 10 ++-- .../forSimpleMessage_NonSubscribe.yaml | 8 +-- .../subscribe/forSimpleMessage_Subscribe.yaml | 10 ++-- ...ultipleResponseEncrypted_NonSubscribe.yaml | 16 ++--- .../multipleResponseEncrypted_Subscribe.yaml | 6 +- .../multipleResponse_NonSubscribe.yaml | 16 ++--- .../subscribe/multipleResponse_Subscribe.yaml | 6 +- .../subscribe/notPermitted_Subscribe.yaml | 4 +- ...estEncryptedMultiplexing_NonSubscribe.yaml | 12 ++-- .../testEncryptedMultiplexing_Subscribe.yaml | 14 ++--- .../testMultiplexing_NonSubscribe.yaml | 12 ++-- .../subscribe/testMultiplexing_Subscribe.yaml | 14 ++--- .../chnnelNotPermitted_NonSubscribe.yaml | 4 +- .../chnnelNotPermitted_Subscribe.yaml | 4 +- .../tests/fixtures/time_NonSubscribe.yaml | 4 +- .../unsubscribe/channel_NonSubscribe.yaml | 4 +- .../unsubscribe/channel_Subscribe.yaml | 6 +- .../groupNetworkError_NonSubscribe.yaml | 8 +-- .../groupNetworkError_Subscribe.yaml | 6 +- .../unsubscribe/networkError_Subscribe.yaml | 6 +- .../wildcard/connAndUns_NonSubscribe.yaml | 4 +- .../wildcard/connAndUns_Subscribe.yaml | 6 +- .../wildcard/message_NonSubscribe.yaml | 8 +-- .../fixtures/wildcard/message_Subscribe.yaml | 10 ++-- 94 files changed, 489 insertions(+), 489 deletions(-) diff --git a/.pubnub.yml b/.pubnub.yml index 01221271..2b76d050 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -12,7 +12,7 @@ changelog: text: “Fix use of escaping JSON during publish” type: improvement date: Feb 22, 17 - version: v3.10.0 + version: v3.11.0 - changes: - @@ -232,4 +232,4 @@ features: name: go schema: 1 scm: github.com/pubnub/go -version: “3.10.0” +version: “3.11.0” diff --git a/README.md b/README.md index 2665b13b..42379297 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#PubNub 3.10.0 client for Go +#PubNub 3.11.0 client for Go * Go (1.2, 1.3, 1.4, 1.5, 1.6, 1.7.3, 1.8) * Google App Engine (1.9.28 - 2015-10-29) * Managed VMs (Google Cloud SDK 133.0.0) @@ -9,7 +9,7 @@ ## Contact support@pubnub.com for all questions -##PubNub 3.10.0 Go based APIs +##PubNub 3.11.0 Go based APIs Learn more at http://www.pubnub.com ## Available in this repository @@ -22,7 +22,7 @@ Learn more at http://www.pubnub.com ### For Non Google App Engine -* [PubNub SDK for GO](messaging) (3.10.0) +* [PubNub SDK for GO](messaging) (3.11.0) * [Example](messaging/examples/cli/pubnubExample.go) ## Contact support@pubnub.com for all questions diff --git a/VERSION b/VERSION index 30291cba..afad8186 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.10.0 +3.11.0 diff --git a/gae-example/README.md b/gae-example/README.md index 62ba79c8..a0e198f5 100644 --- a/gae-example/README.md +++ b/gae-example/README.md @@ -1,4 +1,4 @@ -#PubNub 3.10.0 example Google App Engine using Go +#PubNub 3.11.0 example Google App Engine using Go ###Demo Console App (Tested on Google App Engine SDK 1.9.28 - 2015-10-29) We've included a demo console app which documents all the functionality of the client, for example: diff --git a/gae-managed-vm-example/README.md b/gae-managed-vm-example/README.md index 05aaa90c..b3b4a1c8 100644 --- a/gae-managed-vm-example/README.md +++ b/gae-managed-vm-example/README.md @@ -1,4 +1,4 @@ -#PubNub 3.10.0 example Google App Engine Managed VM using Go +#PubNub 3.11.0 example Google App Engine Managed VM using Go ###Demo Console App (Tested for Managed VMs on Google Cloud SDK 133.0.0) We've included a demo console app which documents all the functionality of the client, for example: diff --git a/gae/messaging/pubnub.go b/gae/messaging/pubnub.go index b1a69d17..b46cb9c9 100644 --- a/gae/messaging/pubnub.go +++ b/gae/messaging/pubnub.go @@ -1,6 +1,6 @@ // Package messaging provides the implemetation to connect to pubnub api on google appengine. // Build Date: Nov 25, 2016 -// Version: 3.10.0 +// Version: 3.11.0 package messaging //TODO: @@ -60,7 +60,7 @@ const ( const ( //Sdk Identification Param appended to each request sdkIdentificationParamKey = "pnsdk" - sdkIdentificationParamVal = "PubNub-Go-GAE/3.10.0" + sdkIdentificationParamVal = "PubNub-Go-GAE/3.11.0" // This string is appended to all presence channels // to differentiate from the subscribe requests. @@ -216,7 +216,7 @@ var ( // VersionInfo returns the version of the this code along with the build date. func VersionInfo() string { - return "PubNub Go GAE client SDK Version: 3.10.0; Build Date: Nov 25, 2016;" + return "PubNub Go GAE client SDK Version: 3.11.0; Build Date: Nov 25, 2016;" } // initStore initializes the cookie store using the secret key @@ -2727,7 +2727,7 @@ func (pub *Pubnub) connect(context context.Context, w http.ResponseWriter, r *ht Host: origin, Opaque: fmt.Sprintf("//%s%s", origin, opaqueURL), } - useragent := fmt.Sprintf("ua_string=(%s) PubNub-Go-GAE/3.10.0", runtime.GOOS) + useragent := fmt.Sprintf("ua_string=(%s) PubNub-Go-GAE/3.11.0", runtime.GOOS) req.Header.Set("User-Agent", useragent) if err == nil { diff --git a/messaging/README.md b/messaging/README.md index 0ba26220..a7a85ed1 100644 --- a/messaging/README.md +++ b/messaging/README.md @@ -1,13 +1,13 @@ ## Contact support@pubnub.com for all questions -#PubNub 3.10.0 client for Go 1.0.3, 1.1, 1.3, 1.3.1, 1.4.2, 1.5.2, 1.6.2, 1.7.3, 1.8 +#PubNub 3.11.0 client for Go 1.0.3, 1.1, 1.3, 1.3.1, 1.4.2, 1.5.2, 1.6.2, 1.7.3, 1.8 ###Important changes in this version: * The authKey argument was added to all PAM method. * Subscribe method arguments changed ###Change log -* 3.10.0 +* 3.11.0 * Breaking API Change: newPubnub has a new parameter where it expects a logger instance [Example](#init). This fixes a rare race condition. * Fix use of escaping JSON during publish * Prefix uuid with 'pn-' diff --git a/messaging/pubnub_test.go b/messaging/pubnub_test.go index a0801d19..56c4ea62 100644 --- a/messaging/pubnub_test.go +++ b/messaging/pubnub_test.go @@ -1029,7 +1029,7 @@ func TestCreateSubscribeURLReset(t *testing.T) { b, tt := pubnub.createSubscribeURL("", "4") //log.SetOutput(os.Stdout) //log.Printf("b:%s, tt:%s", b, tt) - assert.Equal("/v2/subscribe/demo/ch/0?channel-group=cg&uuid=testuuid&tt=0&tr=4&filter-expr=aoi_x%20%3E%3D%200&heartbeat=10&state=%7B%22ch%22%3A%7B%22k%22%3A%22v%22%7D%7D&pnsdk=PubNub-Go%2F3.10.0", b) + assert.Equal("/v2/subscribe/demo/ch/0?channel-group=cg&uuid=testuuid&tt=0&tr=4&filter-expr=aoi_x%20%3E%3D%200&heartbeat=10&state=%7B%22ch%22%3A%7B%22k%22%3A%22v%22%7D%7D&pnsdk=PubNub-Go%2F3.11.0", b) assert.Equal(senttt, tt) presenceHeartbeat = 0 } @@ -1054,7 +1054,7 @@ func TestCreateSubscribeURL(t *testing.T) { b, tt := pubnub.createSubscribeURL("14767805072942467", "4") //log.SetOutput(os.Stdout) //log.Printf("b:%s, tt:%s", b, tt) - assert.Equal("/v2/subscribe/demo/ch/0?channel-group=cg&uuid=testuuid&tt=14767805072942467&tr=4&filter-expr=aoi_x%20%3E%3D%200&pnsdk=PubNub-Go%2F3.10.0", b) + assert.Equal("/v2/subscribe/demo/ch/0?channel-group=cg&uuid=testuuid&tt=14767805072942467&tr=4&filter-expr=aoi_x%20%3E%3D%200&pnsdk=PubNub-Go%2F3.11.0", b) assert.Equal(senttt, tt) } @@ -1078,7 +1078,7 @@ func TestCreateSubscribeURLFilterExp(t *testing.T) { b, tt := pubnub.createSubscribeURL("14767805072942467", "4") //log.SetOutput(os.Stdout) //log.Printf("b:%s, tt:%s", b, tt) - assert.Equal("/v2/subscribe/demo/ch/0?channel-group=cg&uuid=testuuid&tt=14767805072942467&tr=4&filter-expr=aoi_x%20%3E%3D%200%20AND%20aoi_x%20%3C%3D%202%20AND%20aoi_y%20%3E%3D%200%20AND%20aoi_y%3C%3D%202&pnsdk=PubNub-Go%2F3.10.0", b) + assert.Equal("/v2/subscribe/demo/ch/0?channel-group=cg&uuid=testuuid&tt=14767805072942467&tr=4&filter-expr=aoi_x%20%3E%3D%200%20AND%20aoi_x%20%3C%3D%202%20AND%20aoi_y%20%3E%3D%200%20AND%20aoi_y%3C%3D%202&pnsdk=PubNub-Go%2F3.11.0", b) assert.Equal(senttt, tt) } @@ -1108,7 +1108,7 @@ func TestCreatePresenceHeartbeatURL(t *testing.T) { //log.SetOutput(os.Stdout) //log.Printf("b:%s", b) - assert.Equal("/v2/presence/sub_key/demo/channel/ch/heartbeat?channel-group=cg&uuid=testuuid&heartbeat=10&state=%7B%22ch%22%3A%7B%22k%22%3A%22v%22%7D%7D&pnsdk=PubNub-Go%2F3.10.0", b) + assert.Equal("/v2/presence/sub_key/demo/channel/ch/heartbeat?channel-group=cg&uuid=testuuid&heartbeat=10&state=%7B%22ch%22%3A%7B%22k%22%3A%22v%22%7D%7D&pnsdk=PubNub-Go%2F3.11.0", b) presenceHeartbeat = 0 } diff --git a/messaging/tests/fixtures/groups/addRemove_NonSubscribe.yaml b/messaging/tests/fixtures/groups/addRemove_NonSubscribe.yaml index 15f45949..16635335 100644 --- a/messaging/tests/fixtures/groups/addRemove_NonSubscribe.yaml +++ b/messaging/tests/fixtures/groups/addRemove_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?add=Channel_AddRemove1%2CChannel_AddRemove2&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_AddRemove_1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?add=Channel_AddRemove1%2CChannel_AddRemove2&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_AddRemove_1 method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_AddRemove_1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_AddRemove_1 method: GET response: body: '{"status": 200, "payload": {"channels": ["Channel_AddRemove1", "Channel_AddRemove2"], @@ -80,8 +80,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?pnsdk=PubNub-Go%2F3.10.0&remove=Channel_AddRemove1&uuid=UUID_AddRemove_2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?pnsdk=PubNub-Go%2F3.11.0&remove=Channel_AddRemove1&uuid=UUID_AddRemove_2 method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -116,8 +116,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_AddRemove_2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AddRemove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_AddRemove_2 method: GET response: body: '{"status": 200, "payload": {"channels": ["Channel_AddRemove2"], "group": diff --git a/messaging/tests/fixtures/groups/alreadySubscribed_NonSubscribe.yaml b/messaging/tests/fixtures/groups/alreadySubscribed_NonSubscribe.yaml index d9287dd0..3bf30e04 100644 --- a/messaging/tests/fixtures/groups/alreadySubscribed_NonSubscribe.yaml +++ b/messaging/tests/fixtures/groups/alreadySubscribed_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AlreadySubscribed?add=adsf&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_AlreadySubscribed + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AlreadySubscribed?add=adsf&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_AlreadySubscribed method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_AlreadySubscribed&channel-group=Group_AlreadySubscribed&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_AlreadySubscribed&channel-group=Group_AlreadySubscribed&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' @@ -79,8 +79,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AlreadySubscribed/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_AlreadySubscribed + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_AlreadySubscribed/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_AlreadySubscribed method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": diff --git a/messaging/tests/fixtures/groups/alreadySubscribed_Subscribe.yaml b/messaging/tests/fixtures/groups/alreadySubscribed_Subscribe.yaml index 3645f713..702bec32 100644 --- a/messaging/tests/fixtures/groups/alreadySubscribed_Subscribe.yaml +++ b/messaging/tests/fixtures/groups/alreadySubscribed_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_AlreadySubscribed&tt=0&uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_AlreadySubscribed&tt=0&uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14588035016872721"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_AlreadySubscribed&tt=0&uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_AlreadySubscribed&tt=0&uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14588035017179157"]' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_AlreadySubscribed&tt=14588035016872721&uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_AlreadySubscribed&tt=14588035016872721&uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/groups/conAndUnsMultiple_NonSubscribe.yaml b/messaging/tests/fixtures/groups/conAndUnsMultiple_NonSubscribe.yaml index bb1a1ea0..b11d24de 100644 --- a/messaging/tests/fixtures/groups/conAndUnsMultiple_NonSubscribe.yaml +++ b/messaging/tests/fixtures/groups/conAndUnsMultiple_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_1?add=adsf&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiple_CAU + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_1?add=adsf&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiple_CAU method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_2?add=adsf&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiple_CAU + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_2?add=adsf&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiple_CAU method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -80,8 +80,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_3?add=adsf&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiple_CAU + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_3?add=adsf&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiple_CAU method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -116,8 +116,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_Multiple_CAU&channel-group=Group_ConAndUnsMult_1,Group_ConAndUnsMult_2,Group_ConAndUnsMult_3&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_Multiple_CAU&channel-group=Group_ConAndUnsMult_1,Group_ConAndUnsMult_2,Group_ConAndUnsMult_3&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' @@ -151,8 +151,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_1/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiple_CAU + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_1/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiple_CAU method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -187,8 +187,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_2/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiple_CAU + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_2/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiple_CAU method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -223,8 +223,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_3/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiple_CAU + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_ConAndUnsMult_3/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiple_CAU method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": diff --git a/messaging/tests/fixtures/groups/conAndUnsMultiple_Subscribe.yaml b/messaging/tests/fixtures/groups/conAndUnsMultiple_Subscribe.yaml index 5833dd6f..ae1bb4f5 100644 --- a/messaging/tests/fixtures/groups/conAndUnsMultiple_Subscribe.yaml +++ b/messaging/tests/fixtures/groups/conAndUnsMultiple_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_ConAndUnsMult_1,Group_ConAndUnsMult_2,Group_ConAndUnsMult_3&tt=0&uuid=UUID_Multiple_CAU&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_ConAndUnsMult_1,Group_ConAndUnsMult_2,Group_ConAndUnsMult_3&tt=0&uuid=UUID_Multiple_CAU&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14592519402599982",""]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_ConAndUnsMult_1,Group_ConAndUnsMult_2,Group_ConAndUnsMult_3&tt=14592519402599982&uuid=UUID_Multiple_CAU&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_ConAndUnsMult_1,Group_ConAndUnsMult_2,Group_ConAndUnsMult_3&tt=14592519402599982&uuid=UUID_Multiple_CAU&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/groups/conAndUnsSingle_NonSubscribe.yaml b/messaging/tests/fixtures/groups/conAndUnsSingle_NonSubscribe.yaml index f1b8ef5f..47741240 100644 --- a/messaging/tests/fixtures/groups/conAndUnsSingle_NonSubscribe.yaml +++ b/messaging/tests/fixtures/groups/conAndUnsSingle_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupSubscriptionConAndUnsSingle?add=adsf&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_GroupSubscriptionConAndUnsSingle + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupSubscriptionConAndUnsSingle?add=adsf&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_GroupSubscriptionConAndUnsSingle method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_GroupSubscriptionConAndUnsSingle&channel-group=Group_GroupSubscriptionConAndUnsSingle&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_GroupSubscriptionConAndUnsSingle&channel-group=Group_GroupSubscriptionConAndUnsSingle&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' @@ -79,8 +79,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupSubscriptionConAndUnsSingle/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_GroupSubscriptionConAndUnsSingle + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupSubscriptionConAndUnsSingle/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_GroupSubscriptionConAndUnsSingle method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": diff --git a/messaging/tests/fixtures/groups/conAndUnsSingle_Subscribe.yaml b/messaging/tests/fixtures/groups/conAndUnsSingle_Subscribe.yaml index 3565562a..fe990e35 100644 --- a/messaging/tests/fixtures/groups/conAndUnsSingle_Subscribe.yaml +++ b/messaging/tests/fixtures/groups/conAndUnsSingle_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupSubscriptionConAndUnsSingle&tt=0&uuid=UUID_GroupSubscriptionConAndUnsSingle&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupSubscriptionConAndUnsSingle&tt=0&uuid=UUID_GroupSubscriptionConAndUnsSingle&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14588034967961806"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupSubscriptionConAndUnsSingle&tt=14588034967961806&uuid=UUID_GroupSubscriptionConAndUnsSingle&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupSubscriptionConAndUnsSingle&tt=14588034967961806&uuid=UUID_GroupSubscriptionConAndUnsSingle&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/groups/notExistingCG_NonSubscribe.yaml b/messaging/tests/fixtures/groups/notExistingCG_NonSubscribe.yaml index 11da0d90..ef404285 100644 --- a/messaging/tests/fixtures/groups/notExistingCG_NonSubscribe.yaml +++ b/messaging/tests/fixtures/groups/notExistingCG_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_NotExistingCG/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_NotExistingCG + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_NotExistingCG/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_NotExistingCG method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_NotExistingCG&channel-group=Group_NotExistingCG&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_NotExistingCG&channel-group=Group_NotExistingCG&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/groups/notExistingCG_Subscribe.yaml b/messaging/tests/fixtures/groups/notExistingCG_Subscribe.yaml index a88d8a31..6ff0e37d 100644 --- a/messaging/tests/fixtures/groups/notExistingCG_Subscribe.yaml +++ b/messaging/tests/fixtures/groups/notExistingCG_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_NotExistingCG&uuid=UUID_NotExistingCG&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_NotExistingCG&uuid=UUID_NotExistingCG&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status":400,"service":"PubSub","error":true,"message":"Channel group diff --git a/messaging/tests/fixtures/groups/notSubscribed_NonSubscribe.yaml b/messaging/tests/fixtures/groups/notSubscribed_NonSubscribe.yaml index 73cf10b2..8d8da216 100644 --- a/messaging/tests/fixtures/groups/notSubscribed_NonSubscribe.yaml +++ b/messaging/tests/fixtures/groups/notSubscribed_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_NotSubscribed?add=adsf&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_NotSubscribed + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_NotSubscribed?add=adsf&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_NotSubscribed method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_NotSubscribed/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_NotSubscribed + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_NotSubscribed/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_NotSubscribed method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": diff --git a/messaging/tests/fixtures/groups/receiveSingleMessage_NonSubscribe.yaml b/messaging/tests/fixtures/groups/receiveSingleMessage_NonSubscribe.yaml index 3b226565..0019680f 100644 --- a/messaging/tests/fixtures/groups/receiveSingleMessage_NonSubscribe.yaml +++ b/messaging/tests/fixtures/groups/receiveSingleMessage_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupReceiveSingleMessage?add=Channel_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_GroupReceiveSingleMessage + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupReceiveSingleMessage?add=Channel_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_GroupReceiveSingleMessage method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_GroupReceiveSingleMessage/0/%22hey%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_GroupReceiveSingleMessage&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_GroupReceiveSingleMessage/0/%22hey%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_GroupReceiveSingleMessage&seqn=1 method: GET response: body: '[1,"Sent","14588034994296823"]' @@ -73,8 +73,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_GroupReceiveSingleMessage&channel-group=Group_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/,/leave?uuid=UUID_GroupReceiveSingleMessage&channel-group=Group_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' @@ -108,8 +108,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupReceiveSingleMessage/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_GroupReceiveSingleMessage + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Group_GroupReceiveSingleMessage/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_GroupReceiveSingleMessage method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": diff --git a/messaging/tests/fixtures/groups/receiveSingleMessage_Subscribe.yaml b/messaging/tests/fixtures/groups/receiveSingleMessage_Subscribe.yaml index 515960a7..0205c25f 100644 --- a/messaging/tests/fixtures/groups/receiveSingleMessage_Subscribe.yaml +++ b/messaging/tests/fixtures/groups/receiveSingleMessage_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupReceiveSingleMessage&tt=0&uuid=UUID_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupReceiveSingleMessage&tt=0&uuid=UUID_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14588028428566008","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupReceiveSingleMessage&uuid=UUID_GroupReceiveSingleMessage&tt=14588028428566008&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupReceiveSingleMessage&uuid=UUID_GroupReceiveSingleMessage&tt=14588028428566008&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14588034994295336","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForSimpleWithCipher","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_GroupReceiveSingleMessage","b":"Group_GroupReceiveSingleMessage","d":"hey"}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupReceiveSingleMessage&tt=14588034994295336&tr=4&uuid=UUID_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Group_GroupReceiveSingleMessage&tt=14588034994295336&tr=4&uuid=UUID_GroupReceiveSingleMessage&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/history/historyFor10EncryptedMessages_NonSubscribe.yaml b/messaging/tests/fixtures/history/historyFor10EncryptedMessages_NonSubscribe.yaml index d77a3c80..ab4c42b0 100644 --- a/messaging/tests/fixtures/history/historyFor10EncryptedMessages_NonSubscribe.yaml +++ b/messaging/tests/fixtures/history/historyFor10EncryptedMessages_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22XggLXEc7XxPftPda7MAeYbIeTF6QrmMKA1zz/+PKMGo=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22XggLXEc7XxPftPda7MAeYbIeTF6QrmMKA1zz/+PKMGo=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=1 method: GET response: body: '[1,"Sent","14610686529002182"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22mAw0tx7L5zEWKIYnvb0FJB08/k38qK2rnD82fN2yy4E=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22mAw0tx7L5zEWKIYnvb0FJB08/k38qK2rnD82fN2yy4E=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=2 method: GET response: body: '[1,"Sent","14610686529220636"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22SSWpsb6UwtDt+bwR2RxwNq++q7In4Fv3P+BryUgre3I=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=3 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22SSWpsb6UwtDt+bwR2RxwNq++q7In4Fv3P+BryUgre3I=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=3 method: GET response: body: '[1,"Sent","14610686529438761"]' @@ -95,8 +95,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22ciDFGdEkWXpZhMeSrBEbP3bEfFaZM+6Dsq90VUGA6+I=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=4 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22ciDFGdEkWXpZhMeSrBEbP3bEfFaZM+6Dsq90VUGA6+I=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=4 method: GET response: body: '[1,"Sent","14610686529658963"]' @@ -124,8 +124,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22KY2sTN89UKR6JJB+GdNZqiLzU8JC0acN8ExV3ZwUiJ4=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=5 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22KY2sTN89UKR6JJB+GdNZqiLzU8JC0acN8ExV3ZwUiJ4=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=5 method: GET response: body: '[1,"Sent","14610686529875057"]' @@ -153,8 +153,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22h5Uhyc8uf3h11w5C68QsVenCf7Llvdq5XWLa1RSgdfU=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=6 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22h5Uhyc8uf3h11w5C68QsVenCf7Llvdq5XWLa1RSgdfU=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=6 method: GET response: body: '[1,"Sent","14610686530090303"]' @@ -182,8 +182,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22AA9MBpymUzq/bfLCtIKFB+J6L+s3UGm6xPGh9kuXsoQ=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=7 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22AA9MBpymUzq/bfLCtIKFB+J6L+s3UGm6xPGh9kuXsoQ=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=7 method: GET response: body: '[1,"Sent","14610686530309259"]' @@ -211,8 +211,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22SfGYYp58jU2FGBNNsRk0kZ8KWRjZ6OsG3OxSySd7FF0=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=8 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22SfGYYp58jU2FGBNNsRk0kZ8KWRjZ6OsG3OxSySd7FF0=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=8 method: GET response: body: '[1,"Sent","14610686530526644"]' @@ -240,8 +240,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22ek+lrKjHCJPp5wYpxWlZcg806w/SWU5dzNYmjqDVb6o=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=9 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22ek+lrKjHCJPp5wYpxWlZcg806w/SWU5dzNYmjqDVb6o=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=9 method: GET response: body: '[1,"Sent","14610686530745567"]' @@ -269,8 +269,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22HrIrwvdGrm3/TM4kCf0EGl5SzcD+JqOXesWtzzc8+UA=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=10 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10EncryptedMessages/0/%22HrIrwvdGrm3/TM4kCf0EGl5SzcD+JqOXesWtzzc8+UA=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e&seqn=10 method: GET response: body: '[1,"Sent","14610686530964823"]' @@ -298,8 +298,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyFor10EncryptedMessages?count=10&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=aabe6be9402dd13b805e47103d9baa0e + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyFor10EncryptedMessages?count=10&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=aabe6be9402dd13b805e47103d9baa0e method: GET response: body: '[["XggLXEc7XxPftPda7MAeYbIeTF6QrmMKA1zz/+PKMGo=","mAw0tx7L5zEWKIYnvb0FJB08/k38qK2rnD82fN2yy4E=","SSWpsb6UwtDt+bwR2RxwNq++q7In4Fv3P+BryUgre3I=","ciDFGdEkWXpZhMeSrBEbP3bEfFaZM+6Dsq90VUGA6+I=","KY2sTN89UKR6JJB+GdNZqiLzU8JC0acN8ExV3ZwUiJ4=","h5Uhyc8uf3h11w5C68QsVenCf7Llvdq5XWLa1RSgdfU=","AA9MBpymUzq/bfLCtIKFB+J6L+s3UGm6xPGh9kuXsoQ=","SfGYYp58jU2FGBNNsRk0kZ8KWRjZ6OsG3OxSySd7FF0=","ek+lrKjHCJPp5wYpxWlZcg806w/SWU5dzNYmjqDVb6o=","HrIrwvdGrm3/TM4kCf0EGl5SzcD+JqOXesWtzzc8+UA="],14610686529002182,14610686530964823]' diff --git a/messaging/tests/fixtures/history/historyFor10Messages_NonSubscribe.yaml b/messaging/tests/fixtures/history/historyFor10Messages_NonSubscribe.yaml index cbc800b4..fdad6125 100644 --- a/messaging/tests/fixtures/history/historyFor10Messages_NonSubscribe.yaml +++ b/messaging/tests/fixtures/history/historyFor10Messages_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%200%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%200%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=1 method: GET response: body: '[1,"Sent","14610686496145768"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%201%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%201%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=2 method: GET response: body: '[1,"Sent","14610686496359615"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%202%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=3 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%202%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=3 method: GET response: body: '[1,"Sent","14610686496577545"]' @@ -95,8 +95,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%203%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=4 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%203%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=4 method: GET response: body: '[1,"Sent","14610686496820894"]' @@ -124,8 +124,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%204%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=5 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%204%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=5 method: GET response: body: '[1,"Sent","14610686497039988"]' @@ -153,8 +153,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%205%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=6 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%205%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=6 method: GET response: body: '[1,"Sent","14610686497257789"]' @@ -182,8 +182,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%206%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=7 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%206%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=7 method: GET response: body: '[1,"Sent","14610686497480307"]' @@ -211,8 +211,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%207%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=8 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%207%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=8 method: GET response: body: '[1,"Sent","14610686497708413"]' @@ -240,8 +240,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%208%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=9 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%208%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=9 method: GET response: body: '[1,"Sent","14610686497924679"]' @@ -269,8 +269,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%209%22?pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=10 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyFor10Messages/0/%22Test%20Message%209%22?pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48&seqn=10 method: GET response: body: '[1,"Sent","14610686498144536"]' @@ -298,8 +298,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyFor10Messages?count=10&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=ed37aad040cc602280dc702b7693ae48 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyFor10Messages?count=10&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=ed37aad040cc602280dc702b7693ae48 method: GET response: body: '[["Test Message 0","Test Message 1","Test Message 2","Test Message 3","Test diff --git a/messaging/tests/fixtures/history/historyParamsFor10EncryptedMessages_NonSubscribe.yaml b/messaging/tests/fixtures/history/historyParamsFor10EncryptedMessages_NonSubscribe.yaml index 14d2d4b5..f9dcd975 100644 --- a/messaging/tests/fixtures/history/historyParamsFor10EncryptedMessages_NonSubscribe.yaml +++ b/messaging/tests/fixtures/history/historyParamsFor10EncryptedMessages_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_start + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_start method: GET response: body: '[14610686725684022]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22XggLXEc7XxPftPda7MAeYbIeTF6QrmMKA1zz/+PKMGo=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22XggLXEc7XxPftPda7MAeYbIeTF6QrmMKA1zz/+PKMGo=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=1 method: GET response: body: '[1,"Sent","14610686725740916"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22mAw0tx7L5zEWKIYnvb0FJB08/k38qK2rnD82fN2yy4E=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22mAw0tx7L5zEWKIYnvb0FJB08/k38qK2rnD82fN2yy4E=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=2 method: GET response: body: '[1,"Sent","14610686725959587"]' @@ -95,8 +95,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22SSWpsb6UwtDt+bwR2RxwNq++q7In4Fv3P+BryUgre3I=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=3 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22SSWpsb6UwtDt+bwR2RxwNq++q7In4Fv3P+BryUgre3I=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=3 method: GET response: body: '[1,"Sent","14610686726177522"]' @@ -124,8 +124,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22ciDFGdEkWXpZhMeSrBEbP3bEfFaZM+6Dsq90VUGA6+I=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=4 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22ciDFGdEkWXpZhMeSrBEbP3bEfFaZM+6Dsq90VUGA6+I=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=4 method: GET response: body: '[1,"Sent","14610686726390662"]' @@ -153,8 +153,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22KY2sTN89UKR6JJB+GdNZqiLzU8JC0acN8ExV3ZwUiJ4=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=5 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22KY2sTN89UKR6JJB+GdNZqiLzU8JC0acN8ExV3ZwUiJ4=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=5 method: GET response: body: '[1,"Sent","14610686726607632"]' @@ -182,8 +182,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_mid + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_mid method: GET response: body: '[14610686757022368]' @@ -211,8 +211,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22h5Uhyc8uf3h11w5C68QsVenCf7Llvdq5XWLa1RSgdfU=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=6 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22h5Uhyc8uf3h11w5C68QsVenCf7Llvdq5XWLa1RSgdfU=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=6 method: GET response: body: '[1,"Sent","14610686757083461"]' @@ -240,8 +240,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22AA9MBpymUzq/bfLCtIKFB+J6L+s3UGm6xPGh9kuXsoQ=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=7 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22AA9MBpymUzq/bfLCtIKFB+J6L+s3UGm6xPGh9kuXsoQ=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=7 method: GET response: body: '[1,"Sent","14610686757299827"]' @@ -269,8 +269,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22SfGYYp58jU2FGBNNsRk0kZ8KWRjZ6OsG3OxSySd7FF0=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=8 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22SfGYYp58jU2FGBNNsRk0kZ8KWRjZ6OsG3OxSySd7FF0=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=8 method: GET response: body: '[1,"Sent","14610686757512593"]' @@ -298,8 +298,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22ek+lrKjHCJPp5wYpxWlZcg806w/SWU5dzNYmjqDVb6o=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=9 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22ek+lrKjHCJPp5wYpxWlZcg806w/SWU5dzNYmjqDVb6o=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=9 method: GET response: body: '[1,"Sent","14610686757723807"]' @@ -327,8 +327,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22HrIrwvdGrm3/TM4kCf0EGl5SzcD+JqOXesWtzzc8+UA=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=10 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10EncryptedMessages/0/%22HrIrwvdGrm3/TM4kCf0EGl5SzcD+JqOXesWtzzc8+UA=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages&seqn=10 method: GET response: body: '[1,"Sent","14610686757935083"]' @@ -356,8 +356,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_end + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_end method: GET response: body: '[14610686788315970]' @@ -385,8 +385,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10EncryptedMessages?count=5&reverse=false&start=14610686725684022&end=14610686757022368&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10EncryptedMessages?count=5&reverse=false&start=14610686725684022&end=14610686757022368&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages method: GET response: body: '[["XggLXEc7XxPftPda7MAeYbIeTF6QrmMKA1zz/+PKMGo=","mAw0tx7L5zEWKIYnvb0FJB08/k38qK2rnD82fN2yy4E=","SSWpsb6UwtDt+bwR2RxwNq++q7In4Fv3P+BryUgre3I=","ciDFGdEkWXpZhMeSrBEbP3bEfFaZM+6Dsq90VUGA6+I=","KY2sTN89UKR6JJB+GdNZqiLzU8JC0acN8ExV3ZwUiJ4="],14610686725740916,14610686726607632]' @@ -420,8 +420,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10EncryptedMessages?count=5&reverse=false&start=14610686757022368&end=14610686788315970&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10EncryptedMessages + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10EncryptedMessages?count=5&reverse=false&start=14610686757022368&end=14610686788315970&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10EncryptedMessages method: GET response: body: '[["h5Uhyc8uf3h11w5C68QsVenCf7Llvdq5XWLa1RSgdfU=","AA9MBpymUzq/bfLCtIKFB+J6L+s3UGm6xPGh9kuXsoQ=","SfGYYp58jU2FGBNNsRk0kZ8KWRjZ6OsG3OxSySd7FF0=","ek+lrKjHCJPp5wYpxWlZcg806w/SWU5dzNYmjqDVb6o=","HrIrwvdGrm3/TM4kCf0EGl5SzcD+JqOXesWtzzc8+UA="],14610686757083461,14610686757935083]' diff --git a/messaging/tests/fixtures/history/historyParamsFor10Messages_NonSubscribe.yaml b/messaging/tests/fixtures/history/historyParamsFor10Messages_NonSubscribe.yaml index 52587301..619c0b47 100644 --- a/messaging/tests/fixtures/history/historyParamsFor10Messages_NonSubscribe.yaml +++ b/messaging/tests/fixtures/history/historyParamsFor10Messages_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_start + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_start method: GET response: body: '[14610686611848931]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%200%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%200%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=1 method: GET response: body: '[1,"Sent","14610686611901609"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%201%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%201%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=2 method: GET response: body: '[1,"Sent","14610686612122668"]' @@ -95,8 +95,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%202%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=3 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%202%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=3 method: GET response: body: '[1,"Sent","14610686612361210"]' @@ -124,8 +124,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%203%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=4 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%203%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=4 method: GET response: body: '[1,"Sent","14610686612581098"]' @@ -153,8 +153,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%204%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=5 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%204%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=5 method: GET response: body: '[1,"Sent","14610686612795087"]' @@ -182,8 +182,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_mid + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_mid method: GET response: body: '[14610686643184393]' @@ -211,8 +211,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%205%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=6 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%205%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=6 method: GET response: body: '[1,"Sent","14610686643238899"]' @@ -240,8 +240,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%206%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=7 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%206%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=7 method: GET response: body: '[1,"Sent","14610686643453273"]' @@ -269,8 +269,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%207%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=8 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%207%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=8 method: GET response: body: '[1,"Sent","14610686643664973"]' @@ -298,8 +298,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%208%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=9 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%208%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=9 method: GET response: body: '[1,"Sent","14610686643875191"]' @@ -327,8 +327,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%209%22?pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages&seqn=10 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/historyParamsFor10Messages/0/%22Test%20Message%209%22?pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages&seqn=10 method: GET response: body: '[1,"Sent","14610686644086027"]' @@ -356,8 +356,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_end + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_end method: GET response: body: '[14610686674473994]' @@ -385,8 +385,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10Messages?count=5&reverse=false&start=14610686611848931&end=14610686643184393&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10Messages?count=5&reverse=false&start=14610686611848931&end=14610686643184393&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages method: GET response: body: '[["Test Message 0","Test Message 1","Test Message 2","Test Message 3","Test @@ -421,8 +421,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10Messages?count=5&reverse=false&start=14610686643184393&end=14610686674473994&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=uuid_historyParamsFor10Messages + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/historyParamsFor10Messages?count=5&reverse=false&start=14610686643184393&end=14610686674473994&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=uuid_historyParamsFor10Messages method: GET response: body: '[["Test Message 5","Test Message 6","Test Message 7","Test Message 8","Test diff --git a/messaging/tests/fixtures/history/withTimetoken_NonSubscribe.yaml b/messaging/tests/fixtures/history/withTimetoken_NonSubscribe.yaml index cde02ade..0563be0e 100644 --- a/messaging/tests/fixtures/history/withTimetoken_NonSubscribe.yaml +++ b/messaging/tests/fixtures/history/withTimetoken_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%200%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%200%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=1 method: GET response: body: '[1,"Sent","14615805862249273"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%201%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%201%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=2 method: GET response: body: '[1,"Sent","14615805862479911"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%202%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=3 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%202%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=3 method: GET response: body: '[1,"Sent","14615805862706370"]' @@ -95,8 +95,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%203%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=4 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%203%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=4 method: GET response: body: '[1,"Sent","14615805862937770"]' @@ -124,8 +124,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%204%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=5 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%204%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=5 method: GET response: body: '[1,"Sent","14615805863182787"]' @@ -153,8 +153,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%205%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=6 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%205%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=6 method: GET response: body: '[1,"Sent","14615805863426513"]' @@ -182,8 +182,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%206%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=7 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%206%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=7 method: GET response: body: '[1,"Sent","14615805863682264"]' @@ -211,8 +211,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%207%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=8 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%207%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=8 method: GET response: body: '[1,"Sent","14615805864120535"]' @@ -240,8 +240,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%208%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=9 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%208%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=9 method: GET response: body: '[1,"Sent","14615805864372345"]' @@ -269,8 +269,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%209%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT&seqn=10 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_HistoryWithTT/0/%22Test%20TT%20Message%209%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT&seqn=10 method: GET response: body: '[1,"Sent","14615805864620141"]' @@ -298,8 +298,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_HistoryWithTT?count=10&reverse=false&include_token=true&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_HistoryWithTT + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_HistoryWithTT?count=10&reverse=false&include_token=true&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_HistoryWithTT method: GET response: body: '[[{"message":"Test TT Message 0","timetoken":14615805862249273},{"message":"Test diff --git a/messaging/tests/fixtures/pam/grantAndRevokeChannelLevelSubscribe_NonSubscribe.yaml b/messaging/tests/fixtures/pam/grantAndRevokeChannelLevelSubscribe_NonSubscribe.yaml index 689a1fa2..28adbef4 100644 --- a/messaging/tests/fixtures/pam/grantAndRevokeChannelLevelSubscribe_NonSubscribe.yaml +++ b/messaging/tests/fixtures/pam/grantAndRevokeChannelLevelSubscribe_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?channel=testChannelGrantAndRevokeChannelLevelSubscribe&pnsdk=PubNub-Go%2F3.10.0&r=1×tamp=1457161961&ttl=8&uuid=2675e92b40231861806fdf340d4b6c45&w=1&signature=Q6iIMsqZ5u_oWfdtP2VbG2V6eQVDaYZ6w6I_XoxQ1fE= + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?channel=testChannelGrantAndRevokeChannelLevelSubscribe&pnsdk=PubNub-Go%2F3.11.0&r=1×tamp=1457161961&ttl=8&uuid=2675e92b40231861806fdf340d4b6c45&w=1&signature=Q6iIMsqZ5u_oWfdtP2VbG2V6eQVDaYZ6w6I_XoxQ1fE= method: GET response: body: '{"message":"Success","payload":{"level":"channel","subscribe_key":"sub-c-90c51098-c040-11e5-a316-0619f8945a4f","ttl":8,"channels":{"testChannelGrantAndRevokeChannelLevelSubscribe":{"r":1,"w":1,"m":0}}},"service":"Access @@ -40,8 +40,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?channel=testChannelGrantAndRevokeChannelLevelSubscribe&pnsdk=PubNub-Go%2F3.10.0&r=0×tamp=1457161967&uuid=2675e92b40231861806fdf340d4b6c45&w=0&signature=3Dp8Bvpo8BSR_i57ckh9hjxjhATFhcVQl4rslYBNxZg= + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?channel=testChannelGrantAndRevokeChannelLevelSubscribe&pnsdk=PubNub-Go%2F3.11.0&r=0×tamp=1457161967&uuid=2675e92b40231861806fdf340d4b6c45&w=0&signature=3Dp8Bvpo8BSR_i57ckh9hjxjhATFhcVQl4rslYBNxZg= method: GET response: body: '{"message":"Success","payload":{"level":"channel","subscribe_key":"sub-c-90c51098-c040-11e5-a316-0619f8945a4f","ttl":1,"channels":{"testChannelGrantAndRevokeChannelLevelSubscribe":{"r":0,"w":0,"m":0}}},"service":"Access diff --git a/messaging/tests/fixtures/pam/grantAndRevokeSubKeyLevelSubscribe_NonSubscribe.yaml b/messaging/tests/fixtures/pam/grantAndRevokeSubKeyLevelSubscribe_NonSubscribe.yaml index f69b58bc..8fd21a90 100644 --- a/messaging/tests/fixtures/pam/grantAndRevokeSubKeyLevelSubscribe_NonSubscribe.yaml +++ b/messaging/tests/fixtures/pam/grantAndRevokeSubKeyLevelSubscribe_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?pnsdk=PubNub-Go%2F3.10.0&r=1×tamp=1457161956&ttl=4&uuid=3a3053a7407da58980129ac89a598c3f&w=1&signature=GsQFhb1S7SW8uR0VTnHLhnbxHfSiJQ_BpUjCx0UPhzw= + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?pnsdk=PubNub-Go%2F3.11.0&r=1×tamp=1457161956&ttl=4&uuid=3a3053a7407da58980129ac89a598c3f&w=1&signature=GsQFhb1S7SW8uR0VTnHLhnbxHfSiJQ_BpUjCx0UPhzw= method: GET response: body: '{"message":"Success","payload":{"level":"subkey","subscribe_key":"sub-c-90c51098-c040-11e5-a316-0619f8945a4f","ttl":4,"r":1,"w":1,"m":0},"service":"Access @@ -40,8 +40,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?pnsdk=PubNub-Go%2F3.10.0&r=0×tamp=1457161961&uuid=3a3053a7407da58980129ac89a598c3f&w=0&signature=yO1RPSW9PleUmgt7j_ETv3usQCx8TgSphX8hrDGHdKg= + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?pnsdk=PubNub-Go%2F3.11.0&r=0×tamp=1457161961&uuid=3a3053a7407da58980129ac89a598c3f&w=0&signature=yO1RPSW9PleUmgt7j_ETv3usQCx8TgSphX8hrDGHdKg= method: GET response: body: '{"message":"Success","payload":{"level":"subkey","subscribe_key":"sub-c-90c51098-c040-11e5-a316-0619f8945a4f","ttl":1,"r":0,"w":0,"m":0},"service":"Access diff --git a/messaging/tests/fixtures/pam/grantChannelLevelSubscribeWithAuth_NonSubscribe.yaml b/messaging/tests/fixtures/pam/grantChannelLevelSubscribeWithAuth_NonSubscribe.yaml index f285a3bd..859b8a64 100644 --- a/messaging/tests/fixtures/pam/grantChannelLevelSubscribeWithAuth_NonSubscribe.yaml +++ b/messaging/tests/fixtures/pam/grantChannelLevelSubscribeWithAuth_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?auth=myAuthKey&channel=testGrantChannelLevelSubscribeWithAuth&pnsdk=PubNub-Go%2F3.10.0&r=1×tamp=1457161967&ttl=1&uuid=d1093722407c1fd980ba5ed0e9882d91&w=1&signature=eyvk-U21nVGWGfmV_aIpaAHG5UFW9PYDZ4Bts80yGEU= + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/auth/grant/sub-key/sub-c-90c51098-c040-11e5-a316-0619f8945a4f?auth=myAuthKey&channel=testGrantChannelLevelSubscribeWithAuth&pnsdk=PubNub-Go%2F3.11.0&r=1×tamp=1457161967&ttl=1&uuid=d1093722407c1fd980ba5ed0e9882d91&w=1&signature=eyvk-U21nVGWGfmV_aIpaAHG5UFW9PYDZ4Bts80yGEU= method: GET response: body: '{"message":"Success","payload":{"level":"user","subscribe_key":"sub-c-90c51098-c040-11e5-a316-0619f8945a4f","ttl":1,"channel":"testGrantChannelLevelSubscribeWithAuth","auths":{"myAuthKey":{"r":1,"w":1,"m":0}}},"service":"Access diff --git a/messaging/tests/fixtures/presence/customUuid_NonSubscribe.yaml b/messaging/tests/fixtures/presence/customUuid_NonSubscribe.yaml index c3647a41..55b3a3ff 100644 --- a/messaging/tests/fixtures/presence/customUuid_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/customUuid_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/customUuid?disable_uuids=0&state=1&pnsdk=PubNub-Go%2F3.10.0&uuid=customuuid + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/customUuid?disable_uuids=0&state=1&pnsdk=PubNub-Go%2F3.11.0&uuid=customuuid method: GET response: body: '{"status": 200, "message": "OK", "service": "Presence", "uuids": [{"uuid": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/customUuid/leave?uuid=customuuid&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/customUuid/leave?uuid=customuuid&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/presence/customUuid_Subscribe.yaml b/messaging/tests/fixtures/presence/customUuid_Subscribe.yaml index 72f47347..2317ede3 100644 --- a/messaging/tests/fixtures/presence/customUuid_Subscribe.yaml +++ b/messaging/tests/fixtures/presence/customUuid_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/customUuid/0?uuid=customuuid&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/customUuid/0?uuid=customuuid&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14599294753227235"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/customUuid/0?uuid=customuuid&tt=14599294753227235&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/customUuid/0?uuid=customuuid&tt=14599294753227235&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/presence/globalWhereNow_NonSubscribe.yaml b/messaging/tests/fixtures/presence/globalWhereNow_NonSubscribe.yaml index 9583d537..07eb724a 100644 --- a/messaging/tests/fixtures/presence/globalWhereNow_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/globalWhereNow_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f?disable_uuids=0&state=0&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_GlobalWhereNow + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f?disable_uuids=0&state=0&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_GlobalWhereNow method: GET response: body: '{"status": 200, "message": "OK", "payload": {"channels": {"Channel_GlobalWhereNow": @@ -45,8 +45,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_GlobalWhereNow/leave?uuid=UUID_GlobalWhereNow&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_GlobalWhereNow/leave?uuid=UUID_GlobalWhereNow&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/presence/globalWhereNow_Subscribe.yaml b/messaging/tests/fixtures/presence/globalWhereNow_Subscribe.yaml index 87d28b34..8c0e5a45 100644 --- a/messaging/tests/fixtures/presence/globalWhereNow_Subscribe.yaml +++ b/messaging/tests/fixtures/presence/globalWhereNow_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_GlobalWhereNow/0?uuid=UUID_GlobalWhereNow&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_GlobalWhereNow/0?uuid=UUID_GlobalWhereNow&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14599294809819999"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_GlobalWhereNow/0?uuid=UUID_GlobalWhereNow&tt=14599294809819999&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_GlobalWhereNow/0?uuid=UUID_GlobalWhereNow&tt=14599294809819999&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/presence/setGetUserState_NonSubscribe.yaml b/messaging/tests/fixtures/presence/setGetUserState_NonSubscribe.yaml index cff3a9cd..40d832af 100644 --- a/messaging/tests/fixtures/presence/setGetUserState_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/setGetUserState_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetGetUserState/uuid/UUID_SetGetUserState/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetGetUserState + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetGetUserState/uuid/UUID_SetGetUserState/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetGetUserState method: GET response: body: '{"status": 200, "message": "OK", "payload": {"testkey": "testval"}, "service": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetGetUserState/uuid/UUID_SetGetUserState?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetGetUserState + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetGetUserState/uuid/UUID_SetGetUserState?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetGetUserState method: GET response: body: '{"status": 200, "uuid": "UUID_SetGetUserState", "service": "Presence", @@ -80,8 +80,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetGetUserState/leave?uuid=UUID_SetGetUserState&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetGetUserState/leave?uuid=UUID_SetGetUserState&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/presence/setGetUserState_Subscribe.yaml b/messaging/tests/fixtures/presence/setGetUserState_Subscribe.yaml index 168f884a..176a5e95 100644 --- a/messaging/tests/fixtures/presence/setGetUserState_Subscribe.yaml +++ b/messaging/tests/fixtures/presence/setGetUserState_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetGetUserState/0?uuid=UUID_SetGetUserState&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetGetUserState/0?uuid=UUID_SetGetUserState&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14615710323529829"]' @@ -31,7 +31,7 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetGetUserState/0?uuid=UUID_SetGetUserState&tt=14615710323529829&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetGetUserState/0?uuid=UUID_SetGetUserState&tt=14615710323529829&pnsdk=PubNub-Go%2F3.11.0 : {} - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetGetUserState/0?uuid=UUID_SetGetUserState&tt=0&state=%7B%22Channel_SetGetUserState%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetGetUserState/0?uuid=UUID_SetGetUserState&tt=0&state=%7B%22Channel_SetGetUserState%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_NonSubscribe.yaml b/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_NonSubscribe.yaml index 4f57a6de..2912891c 100644 --- a/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateGlobalHereNow/uuid/UUID_SetUserStateGlobalHereNow/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetUserStateGlobalHereNow + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateGlobalHereNow/uuid/UUID_SetUserStateGlobalHereNow/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetUserStateGlobalHereNow method: GET response: body: '{"status": 200, "message": "OK", "payload": {"testkey": "testval"}, "service": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f?disable_uuids=0&state=1&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetUserStateGlobalHereNow + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f?disable_uuids=0&state=1&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetUserStateGlobalHereNow method: GET response: body: '{"status": 200, "message": "OK", "payload": {"channels": {"Channel_SetUserStateGlobalHereNow": @@ -81,8 +81,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateGlobalHereNow/leave?uuid=UUID_SetUserStateGlobalHereNow&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateGlobalHereNow/leave?uuid=UUID_SetUserStateGlobalHereNow&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_Subscribe.yaml b/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_Subscribe.yaml index e6a218c5..399c44ba 100644 --- a/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_Subscribe.yaml +++ b/messaging/tests/fixtures/presence/setUserStateGlobalHereNow_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateGlobalHereNow/0?uuid=UUID_SetUserStateGlobalHereNow&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateGlobalHereNow/0?uuid=UUID_SetUserStateGlobalHereNow&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14615710400371409"]' @@ -31,7 +31,7 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateGlobalHereNow/0?uuid=UUID_SetUserStateGlobalHereNow&tt=0&state=%7B%22Channel_SetUserStateGlobalHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateGlobalHereNow/0?uuid=UUID_SetUserStateGlobalHereNow&tt=0&state=%7B%22Channel_SetUserStateGlobalHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.11.0 : {} - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateGlobalHereNow/0/14615710400371409?uuid=UUID_SetUserStateGlobalHereNow&state=%7B%22Channel_SetUserStateGlobalHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateGlobalHereNow/0/14615710400371409?uuid=UUID_SetUserStateGlobalHereNow&state=%7B%22Channel_SetUserStateGlobalHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/presence/setUserStateHereNow_NonSubscribe.yaml b/messaging/tests/fixtures/presence/setUserStateHereNow_NonSubscribe.yaml index b7764b02..714f358a 100644 --- a/messaging/tests/fixtures/presence/setUserStateHereNow_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/setUserStateHereNow_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateHereNow/uuid/UUID_SetUserStateHereNow/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetUserStateHereNow + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateHereNow/uuid/UUID_SetUserStateHereNow/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetUserStateHereNow method: GET response: body: '{"status": 200, "message": "OK", "payload": {"testkey": "testval"}, "service": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateHereNow?disable_uuids=0&state=1&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetUserStateHereNow + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateHereNow?disable_uuids=0&state=1&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetUserStateHereNow method: GET response: body: '{"status": 200, "message": "OK", "service": "Presence", "uuids": [{"state": @@ -80,8 +80,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateHereNow/leave?uuid=UUID_SetUserStateHereNow&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateHereNow/leave?uuid=UUID_SetUserStateHereNow&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/presence/setUserStateHereNow_Subscribe.yaml b/messaging/tests/fixtures/presence/setUserStateHereNow_Subscribe.yaml index f1b3573e..f3d4e11e 100644 --- a/messaging/tests/fixtures/presence/setUserStateHereNow_Subscribe.yaml +++ b/messaging/tests/fixtures/presence/setUserStateHereNow_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateHereNow/0?uuid=UUID_SetUserStateHereNow&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateHereNow/0?uuid=UUID_SetUserStateHereNow&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14615710361330684"]' @@ -31,6 +31,6 @@ interactions: status: 200 OK code: 200 unclosed_requests: - #? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateHereNow/0?uuid=UUID_SetUserStateHereNow&tt=14615710361330684&state=%7B%22Channel_SetUserStateHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.10.0 - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateHereNow/0?uuid=UUID_SetUserStateHereNow&tt=0&state=%7B%22Channel_SetUserStateHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.10.0 + #? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateHereNow/0?uuid=UUID_SetUserStateHereNow&tt=14615710361330684&state=%7B%22Channel_SetUserStateHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.11.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SetUserStateHereNow/0?uuid=UUID_SetUserStateHereNow&tt=0&state=%7B%22Channel_SetUserStateHereNow%22%3A%7B%22testkey%22%3A%22testval%22%7D%7D&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/presence/setUserStateJSON_NonSubscribe.yaml b/messaging/tests/fixtures/presence/setUserStateJSON_NonSubscribe.yaml index 98d60bd5..26837e8e 100644 --- a/messaging/tests/fixtures/presence/setUserStateJSON_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/setUserStateJSON_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateJSON/uuid/UUID_SetUserStateJSON/data?state=%7B%22testkey%22%3A+%22testval%22%2C%22testkey2%22%3A+%22testval2%22%7D&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetUserStateJSON + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateJSON/uuid/UUID_SetUserStateJSON/data?state=%7B%22testkey%22%3A+%22testval%22%2C%22testkey2%22%3A+%22testval2%22%7D&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetUserStateJSON method: GET response: body: '{"status": 200, "message": "OK", "payload": {"testkey2": "testval2", "testkey": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateJSON/uuid/UUID_SetUserStateJSON/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SetUserStateJSON + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SetUserStateJSON/uuid/UUID_SetUserStateJSON/data?state=%7B%22testkey%22%3A%22testval%22%7D&pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SetUserStateJSON method: GET response: body: '{"status": 200, "message": "OK", "payload": {"testkey": "testval"}, "service": diff --git a/messaging/tests/fixtures/presence/whereNow_NonSubscribe.yaml b/messaging/tests/fixtures/presence/whereNow_NonSubscribe.yaml index 75e3d8cd..eb00d0e8 100644 --- a/messaging/tests/fixtures/presence/whereNow_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/whereNow_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/uuid/UUID_WhereNow?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_WhereNow + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/uuid/UUID_WhereNow?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_WhereNow method: GET response: body: '{"status": 200, "message": "OK", "payload": {"channels": ["Channel_WhereNow"]}, @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_WhereNow/leave?uuid=UUID_WhereNow&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_WhereNow/leave?uuid=UUID_WhereNow&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/presence/whereNow_Subscribe.yaml b/messaging/tests/fixtures/presence/whereNow_Subscribe.yaml index 612db0b3..ba096ba5 100644 --- a/messaging/tests/fixtures/presence/whereNow_Subscribe.yaml +++ b/messaging/tests/fixtures/presence/whereNow_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_WhereNow/0?uuid=UUID_WhereNow&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_WhereNow/0?uuid=UUID_WhereNow&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14599243663018153"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_WhereNow/0?uuid=UUID_WhereNow&tt=14599243663018153&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_WhereNow/0?uuid=UUID_WhereNow&tt=14599243663018153&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/presence/zeroPresence_NonSubscribe.yaml b/messaging/tests/fixtures/presence/zeroPresence_NonSubscribe.yaml index edc247dc..eb8d71b1 100644 --- a/messaging/tests/fixtures/presence/zeroPresence_NonSubscribe.yaml +++ b/messaging/tests/fixtures/presence/zeroPresence_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ZeroPresence/leave?uuid=UUID_zeroPresence&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ZeroPresence/leave?uuid=UUID_zeroPresence&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' @@ -43,8 +43,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ZeroPresence-pnpres/leave?uuid=UUID_zeroPresence&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ZeroPresence-pnpres/leave?uuid=UUID_zeroPresence&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/presence/zeroPresence_Subscribe.yaml b/messaging/tests/fixtures/presence/zeroPresence_Subscribe.yaml index 98b0ac72..2ed3cff5 100644 --- a/messaging/tests/fixtures/presence/zeroPresence_Subscribe.yaml +++ b/messaging/tests/fixtures/presence/zeroPresence_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14615591687540479"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres,Channel_ZeroPresence/0?uuid=UUID_zeroPresence&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres,Channel_ZeroPresence/0?uuid=UUID_zeroPresence&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14615591687802848"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence,Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=14615591687802848&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence,Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=14615591687802848&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[{"action": "join", "timestamp": 1461559169, "uuid": "UUID_zeroPresence", @@ -96,8 +96,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=14615591687540479&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=14615591687540479&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[{"action": "join", "timestamp": 1461559169, "uuid": "UUID_zeroPresence", @@ -126,8 +126,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=14615591694446754&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres/0?uuid=UUID_zeroPresence&tt=14615591694446754&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[{"action": "leave", "timestamp": 1461559169, "uuid": "UUID_zeroPresence", @@ -156,8 +156,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres,Channel_ZeroPresence/0?uuid=UUID_zeroPresence&tt=14615591694446754&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ZeroPresence-pnpres,Channel_ZeroPresence/0?uuid=UUID_zeroPresence&tt=14615591694446754&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[{"action": "leave", "timestamp": 1461559169, "uuid": "UUID_zeroPresence", diff --git a/messaging/tests/fixtures/publish/fire_NonSubscribe.yaml b/messaging/tests/fixtures/publish/fire_NonSubscribe.yaml index 1c58fbad..db68801e 100644 --- a/messaging/tests/fixtures/publish/fire_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/fire_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/fireChannel/0/%22fireTest%22?pnsdk=PubNub-Go%2F3.10.0&uuid=83a979c0407178ba809e6be0c9972c6d&store=0&norep=true&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/fireChannel/0/%22fireTest%22?pnsdk=PubNub-Go%2F3.11.0&uuid=83a979c0407178ba809e6be0c9972c6d&store=0&norep=true&seqn=1 method: GET response: body: '[1,"Sent","14615805862249273"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/fireChannel?count=1&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=4ec1923240c7aaf5809466fc7277e02b + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/fireChannel?count=1&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=4ec1923240c7aaf5809466fc7277e02b method: GET response: body: '[[{"message":"Test TT Message 9","timetoken":14615805864620141}],14615805862249273,14615805864620141]' diff --git a/messaging/tests/fixtures/publish/publishStringWithSerialization_NonSubscribe.yaml b/messaging/tests/fixtures/publish/publishStringWithSerialization_NonSubscribe.yaml index ae0bd42e..232db794 100644 --- a/messaging/tests/fixtures/publish/publishStringWithSerialization_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/publishStringWithSerialization_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_PublishStringWithSerialization/0/%22%7B%5C%22name%5C%22:%20%5C%22Alex%5C%22,%20%5C%22age%5C%22:%20%5C%22123%5C%22%7D%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_PublishStringWithSerialization&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_PublishStringWithSerialization/0/%22%7B%5C%22name%5C%22:%20%5C%22Alex%5C%22,%20%5C%22age%5C%22:%20%5C%22123%5C%22%7D%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_PublishStringWithSerialization&seqn=1 method: GET response: body: '[1,"Sent","14588070821147008"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_PublishStringWithSerialization/leave?uuid=UUID_PublishStringWithSerialization&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_PublishStringWithSerialization/leave?uuid=UUID_PublishStringWithSerialization&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/publish/publishStringWithSerialization_Subscribe.yaml b/messaging/tests/fixtures/publish/publishStringWithSerialization_Subscribe.yaml index a1331310..dcfb62a1 100644 --- a/messaging/tests/fixtures/publish/publishStringWithSerialization_Subscribe.yaml +++ b/messaging/tests/fixtures/publish/publishStringWithSerialization_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithSerialization/0?uuid=UUID_PublishStringWithSerialization&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithSerialization/0?uuid=UUID_PublishStringWithSerialization&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14588062885529707","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithSerialization/0?uuid=UUID_PublishStringWithSerialization&tt=14588062885529707&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithSerialization/0?uuid=UUID_PublishStringWithSerialization&tt=14588062885529707&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14588062885529707","r":4},"m":[{"a":"1","f":0,"i":"UUID_PublishStringWithoutSerialization","s":1,"p":{"t":"14588070821139768","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_PublishStringWithSerialization","d":{"name": "Alex", "age": "123"}}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithSerialization/0?uuid=UUID_PublishStringWithSerialization&tt=14588070821139768&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithSerialization/0?uuid=UUID_PublishStringWithSerialization&tt=14588070821139768&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/publish/publishStringWithoutSerialization_NonSubscribe.yaml b/messaging/tests/fixtures/publish/publishStringWithoutSerialization_NonSubscribe.yaml index 3bf0ee55..6f99b23d 100644 --- a/messaging/tests/fixtures/publish/publishStringWithoutSerialization_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/publishStringWithoutSerialization_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_PublishStringWithoutSerialization/0/%7B%22name%22:%20%22Alex%22,%20%22age%22:%20%22123%22%7D?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_PublishStringWithoutSerialization&store=0&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_PublishStringWithoutSerialization/0/%7B%22name%22:%20%22Alex%22,%20%22age%22:%20%22123%22%7D?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_PublishStringWithoutSerialization&store=0&seqn=1 method: GET response: body: '[1,"Sent","14588070825058322"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_PublishStringWithoutSerialization/leave?uuid=UUID_PublishStringWithoutSerialization&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_PublishStringWithoutSerialization/leave?uuid=UUID_PublishStringWithoutSerialization&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/publish/publishStringWithoutSerialization_Subscribe.yaml b/messaging/tests/fixtures/publish/publishStringWithoutSerialization_Subscribe.yaml index 746d5db1..6d799f1d 100644 --- a/messaging/tests/fixtures/publish/publishStringWithoutSerialization_Subscribe.yaml +++ b/messaging/tests/fixtures/publish/publishStringWithoutSerialization_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithoutSerialization/0?uuid=UUID_PublishStringWithoutSerialization&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithoutSerialization/0?uuid=UUID_PublishStringWithoutSerialization&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14588062886538014","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithoutSerialization/0?uuid=UUID_PublishStringWithoutSerialization&tt=14588062886538014&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithoutSerialization/0?uuid=UUID_PublishStringWithoutSerialization&tt=14588062886538014&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14588062886538014","r":4},"m":[{"a":"1","f":0,"i":"UUID_PublishStringWithoutSerialization","s":1,"p":{"t":"14588070825056505","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_PublishStringWithoutSerialization","d":{"name": "Alex", "age": "123"}}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithoutSerialization/0?uuid=UUID_PublishStringWithoutSerialization&tt=14588070825056505&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_PublishStringWithoutSerialization/0?uuid=UUID_PublishStringWithoutSerialization&tt=14588070825056505&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/publish/publishWithReplicateAndTTL_NonSubscribe.yaml b/messaging/tests/fixtures/publish/publishWithReplicateAndTTL_NonSubscribe.yaml index 7e20a14e..9235a44f 100644 --- a/messaging/tests/fixtures/publish/publishWithReplicateAndTTL_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/publishWithReplicateAndTTL_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(darwin) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/publishWithReplicate/0/%22publishWithReplicate%22?pnsdk=PubNub-Go%2F3.10.0&uuid=279cf3d34053522780466a84346cd79c&norep=true&ttl=10&seqn=1 + - ua_string=(darwin) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/publishWithReplicate/0/%22publishWithReplicate%22?pnsdk=PubNub-Go%2F3.11.0&uuid=279cf3d34053522780466a84346cd79c&norep=true&ttl=10&seqn=1 method: GET response: body: '[1,"Sent","14840636772542248"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(darwin) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/publishWithReplicate?count=1&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=279cf3d34053522780466a84346cd79c + - ua_string=(darwin) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/publishWithReplicate?count=1&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=279cf3d34053522780466a84346cd79c method: GET response: body: '[["publishWithReplicate"],14840636772542248,14840636772542248]' diff --git a/messaging/tests/fixtures/publish/publishWithReplicate_NonSubscribe.yaml b/messaging/tests/fixtures/publish/publishWithReplicate_NonSubscribe.yaml index 1df02110..15ace49f 100644 --- a/messaging/tests/fixtures/publish/publishWithReplicate_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/publishWithReplicate_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/publishWithReplicate/0/%22publishWithReplicate%22?pnsdk=PubNub-Go%2F3.10.0&uuid=069f92924086b3cb80b040839df4f77a&norep=true&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/publishWithReplicate/0/%22publishWithReplicate%22?pnsdk=PubNub-Go%2F3.11.0&uuid=069f92924086b3cb80b040839df4f77a&norep=true&seqn=1 method: GET response: body: '[1,"Sent","14615805862249273"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/publishWithReplicate?count=1&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.10.0&uuid=4ec1923240c7aaf5809466fc7277e02b + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/history/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/publishWithReplicate?count=1&reverse=false&include_token=false&pnsdk=PubNub-Go%2F3.11.0&uuid=4ec1923240c7aaf5809466fc7277e02b method: GET response: body: '[[{"message":"publishWithReplicate","timetoken":14615805864620141}],14615805862249273,14615805864620141]' diff --git a/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2WithEncryption_NonSubscribe.yaml b/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2WithEncryption_NonSubscribe.yaml index cfea3740..cfbec973 100644 --- a/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2WithEncryption_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2WithEncryption_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfoForComplexMessage2WithEncryption/0/%22Bc846Ri5HK1ixqP/dzAyZq23Z/NBlcPn2UX8h38xTGINs72yF5gtU0t9fFEMxjY+DmezWt0nG7eN7RABrj697tK1nooVHYIxgDLMsjMTw5N0K+rUM823n7LcHfEoXaX8oH2E6zkg6iK5pmT8nlh6LF6Bw1G5zkluT8oTjnbFJcpEvTyT2ZKzcqptgYsE9XZiEn84zv0wjDMxSJzlM7cbe2JpLtR99mdkUf8SMVr+J0ym6Z9c02MKLP6bygWzdG9zTdkLSIxJE3R9Yt76XeRFdrbRNWkuQM/uItDsE23+8RKwZRyAScoDMwFAg+BSa6KF1tS6cJlyjxA8o5e9iWykKuHO0h1uAiapzTx9iZluOH2bVZgTUu1GABjXveMBAkrZ1eG4nVOlytsAr1oSekKvWxzyUEP2kFSrtQbg6oGECb1OMmj5bd21cx0vpDWr/juGT7/n4sBr7gYsWDvBaU7awN9Y7bcq14jtiXq/2iNNW0zoI3xe6+qByimHaiAgVoqO%22?pnsdk=PubNub-Go%2F3.10.0&uuid=39388c02403e3719807f25be71d4b628&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfoForComplexMessage2WithEncryption/0/%22Bc846Ri5HK1ixqP/dzAyZq23Z/NBlcPn2UX8h38xTGINs72yF5gtU0t9fFEMxjY+DmezWt0nG7eN7RABrj697tK1nooVHYIxgDLMsjMTw5N0K+rUM823n7LcHfEoXaX8oH2E6zkg6iK5pmT8nlh6LF6Bw1G5zkluT8oTjnbFJcpEvTyT2ZKzcqptgYsE9XZiEn84zv0wjDMxSJzlM7cbe2JpLtR99mdkUf8SMVr+J0ym6Z9c02MKLP6bygWzdG9zTdkLSIxJE3R9Yt76XeRFdrbRNWkuQM/uItDsE23+8RKwZRyAScoDMwFAg+BSa6KF1tS6cJlyjxA8o5e9iWykKuHO0h1uAiapzTx9iZluOH2bVZgTUu1GABjXveMBAkrZ1eG4nVOlytsAr1oSekKvWxzyUEP2kFSrtQbg6oGECb1OMmj5bd21cx0vpDWr/juGT7/n4sBr7gYsWDvBaU7awN9Y7bcq14jtiXq/2iNNW0zoI3xe6+qByimHaiAgVoqO%22?pnsdk=PubNub-Go%2F3.11.0&uuid=39388c02403e3719807f25be71d4b628&seqn=1 method: GET response: body: '[1,"Sent","14570054981518097"]' diff --git a/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2_NonSubscribe.yaml b/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2_NonSubscribe.yaml index 53b59106..7d9c9872 100644 --- a/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage2_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfoForComplexMessage2/0/%7B%22VersionID%22:%223.4%22,%22TimeToken%22:%2213601488652764619%22,%22OperationName%22:%22Publish%22,%22Channels%22:%5B%22ch1%22,%22ch%202%22%5D,%22DemoMessage%22:%7B%22DefaultMessage%22:%22%5C%22~%21@%23$%25%5E%5C%5Cu0026%2A%28%29_+%20%601234567890-=%20qwertyuiop%5B%5D%5C%5C%5C%5C%20%7B%7D%7C%20asdfghjkl;%27%20:%5C%5C%5C%22%20zxcvbnm,./%20%5C%5Cu003c%5C%5Cu003e%3F%20%5C%22%22%7D,%22SampleXML%22:%22%5C%22%5C%5Cu003cdata%5C%5Cu003e%5C%5Cu003cname%5C%5Cu003eDoe%5C%5Cu003c/name%5C%5Cu003e%5C%5Cu003cage%5C%5Cu003e42%5C%5Cu003c/age%5C%5Cu003e%5C%5Cu003c/data%5C%5Cu003e%5C%22%22%7D?pnsdk=PubNub-Go%2F3.10.0&uuid=e8e25d0140f088b68027c6637ae99bac&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfoForComplexMessage2/0/%7B%22VersionID%22:%223.4%22,%22TimeToken%22:%2213601488652764619%22,%22OperationName%22:%22Publish%22,%22Channels%22:%5B%22ch1%22,%22ch%202%22%5D,%22DemoMessage%22:%7B%22DefaultMessage%22:%22%5C%22~%21@%23$%25%5E%5C%5Cu0026%2A%28%29_+%20%601234567890-=%20qwertyuiop%5B%5D%5C%5C%5C%5C%20%7B%7D%7C%20asdfghjkl;%27%20:%5C%5C%5C%22%20zxcvbnm,./%20%5C%5Cu003c%5C%5Cu003e%3F%20%5C%22%22%7D,%22SampleXML%22:%22%5C%22%5C%5Cu003cdata%5C%5Cu003e%5C%5Cu003cname%5C%5Cu003eDoe%5C%5Cu003c/name%5C%5Cu003e%5C%5Cu003cage%5C%5Cu003e42%5C%5Cu003c/age%5C%5Cu003e%5C%5Cu003c/data%5C%5Cu003e%5C%22%22%7D?pnsdk=PubNub-Go%2F3.11.0&uuid=e8e25d0140f088b68027c6637ae99bac&seqn=1 method: GET response: body: '[1,"Sent","14570044383815484"]' diff --git a/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage_NonSubscribe.yaml b/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage_NonSubscribe.yaml index e8f791e3..4037a5fe 100644 --- a/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/successCodeAndInfoForComplexMessage_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfoForComplexMessage/0/%7B%22Foo%22:%22hi%21%22,%22Bar%22:%5B1,2,3,4,5%5D%7D?pnsdk=PubNub-Go%2F3.10.0&uuid=be2f216440b27fbe8050e1a0cd5386e4&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfoForComplexMessage/0/%7B%22Foo%22:%22hi%21%22,%22Bar%22:%5B1,2,3,4,5%5D%7D?pnsdk=PubNub-Go%2F3.11.0&uuid=be2f216440b27fbe8050e1a0cd5386e4&seqn=1 method: GET response: body: '[1,"Sent","14570044383524662"]' diff --git a/messaging/tests/fixtures/publish/successCodeAndInfoWithEncryption_NonSubscribe.yaml b/messaging/tests/fixtures/publish/successCodeAndInfoWithEncryption_NonSubscribe.yaml index 9513b570..d5e467b8 100644 --- a/messaging/tests/fixtures/publish/successCodeAndInfoWithEncryption_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/successCodeAndInfoWithEncryption_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfo/0/%225c69IWbJmfgAF18380MRmWe+1V3gHYH4Wxnlzm4l0RM=%22?pnsdk=PubNub-Go%2F3.10.0&uuid=efc7182f4021463280ec12ff30a6741e&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfo/0/%225c69IWbJmfgAF18380MRmWe+1V3gHYH4Wxnlzm4l0RM=%22?pnsdk=PubNub-Go%2F3.11.0&uuid=efc7182f4021463280ec12ff30a6741e&seqn=1 method: GET response: body: '[1,"Sent","14570025379708944"]' diff --git a/messaging/tests/fixtures/publish/successCodeAndInfo_NonSubscribe.yaml b/messaging/tests/fixtures/publish/successCodeAndInfo_NonSubscribe.yaml index e9c33922..eedb3644 100644 --- a/messaging/tests/fixtures/publish/successCodeAndInfo_NonSubscribe.yaml +++ b/messaging/tests/fixtures/publish/successCodeAndInfo_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfo/0/%22Pubnub%20API%20Usage%20Example%22?pnsdk=PubNub-Go%2F3.10.0&uuid=51fa763a4073511f80ee640fe40da223&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/successCodeAndInfo/0/%22Pubnub%20API%20Usage%20Example%22?pnsdk=PubNub-Go%2F3.11.0&uuid=51fa763a4073511f80ee640fe40da223&seqn=1 method: GET response: body: '[1,"Sent","14570017673026211"]' diff --git a/messaging/tests/fixtures/subscribe/alreadySubscribed_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/alreadySubscribed_NonSubscribe.yaml index 47b39162..c4d49d39 100644 --- a/messaging/tests/fixtures/subscribe/alreadySubscribed_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/alreadySubscribed_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_AlreadySubscribed/0/%22blah%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_AlreadySubscribed&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_AlreadySubscribed/0/%22blah%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_AlreadySubscribed&seqn=1 method: GET response: body: '[1,"Sent","14603735665822132"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_AlreadySubscribed/leave?uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_AlreadySubscribed/leave?uuid=UUID_AlreadySubscribed&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/alreadySubscribed_Subscribe.yaml b/messaging/tests/fixtures/subscribe/alreadySubscribed_Subscribe.yaml index 13bd5d95..49415091 100644 --- a/messaging/tests/fixtures/subscribe/alreadySubscribed_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/alreadySubscribed_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_AlreadySubscribed/0?uuid=UUID_AlreadySubscribed&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_AlreadySubscribed/0?uuid=UUID_AlreadySubscribed&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14603735664245698","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_AlreadySubscribed/0?uuid=UUID_AlreadySubscribed&tt=14603735664245698&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_AlreadySubscribed/0?uuid=UUID_AlreadySubscribed&tt=14603735664245698&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14603735665857211","r":4},"m":[{"a":"1","f":0,"i":"UUID_AlreadySubscribed","s":1,"p":{"t":"14591685620543810","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_AlreadySubscribed","d":["blah"]}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_AlreadySubscribed/0?uuid=UUID_AlreadySubscribed&tt=14603735665857211&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_AlreadySubscribed/0?uuid=UUID_AlreadySubscribed&tt=14603735665857211&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/connectMultipleStatus_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/connectMultipleStatus_NonSubscribe.yaml index 4bfab35d..d9745988 100644 --- a/messaging/tests/fixtures/subscribe/connectMultipleStatus_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/connectMultipleStatus_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ConnectStatus_14,Channel_ConnectStatus_992/leave?uuid=UUID_ConnectStatus&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ConnectStatus_14,Channel_ConnectStatus_992/leave?uuid=UUID_ConnectStatus&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/connectMultipleStatus_Subscribe.yaml b/messaging/tests/fixtures/subscribe/connectMultipleStatus_Subscribe.yaml index a15021e6..ffb345ce 100644 --- a/messaging/tests/fixtures/subscribe/connectMultipleStatus_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/connectMultipleStatus_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus_14,Channel_ConnectStatus_992/0?uuid=UUID_ConnectStatus&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus_14,Channel_ConnectStatus_992/0?uuid=UUID_ConnectStatus&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14595081223862742"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus_14,Channel_ConnectStatus_992/0?uuid=UUID_ConnectStatus&tt=14595081223862742&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus_14,Channel_ConnectStatus_992/0?uuid=UUID_ConnectStatus&tt=14595081223862742&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/connectStatus_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/connectStatus_NonSubscribe.yaml index b92077a0..00ae5798 100644 --- a/messaging/tests/fixtures/subscribe/connectStatus_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/connectStatus_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ConnectStatus/leave?uuid=UUID_ConnectStatus&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ConnectStatus/leave?uuid=UUID_ConnectStatus&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/connectStatus_Subscribe.yaml b/messaging/tests/fixtures/subscribe/connectStatus_Subscribe.yaml index d4ec4707..20eb104c 100644 --- a/messaging/tests/fixtures/subscribe/connectStatus_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/connectStatus_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus/0?uuid=UUID_ConnectStatus&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus/0?uuid=UUID_ConnectStatus&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14586613256441817"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus/0?uuid=UUID_ConnectStatus&tt=14586613256441817&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnectStatus/0?uuid=UUID_ConnectStatus&tt=14586613256441817&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_NonSubscribe.yaml index c2ad53ed..b4e9c539 100644 --- a/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForComplexWithCipher/0/%22Bc846Ri5HK1ixqP/dzAyZq23Z/NBlcPn2UX8h38xTGINs72yF5gtU0t9fFEMxjY+DmezWt0nG7eN7RABrj697tK1nooVHYIxgDLMsjMTw5N0K+rUM823n7LcHfEoXaX8oH2E6zkg6iK5pmT8nlh6LF6Bw1G5zkluT8oTjnbFJcpEvTyT2ZKzcqptgYsE9XZiEn84zv0wjDMxSJzlM7cbe2JpLtR99mdkUf8SMVr+J0ym6Z9c02MKLP6bygWzdG9zTdkLSIxJE3R9Yt76XeRFdrbRNWkuQM/uItDsE23+8RKwZRyAScoDMwFAg+BSa6KF1tS6cJlyjxA8o5e9iWykKuHO0h1uAiapzTx9iZluOH2bVZgTUu1GABjXveMBAkrZ1eG4nVOlytsAr1oSekKvWxzyUEP2kFSrtQbg6oGECb1OMmj5bd21cx0vpDWr/juGT7/n4sBr7gYsWDvBaU7awN9Y7bcq14jtiXq/2iNNW0zoI3xe6+qByimHaiAgVoqO%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SubscriptionConnectedForComplexWithCipher&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForComplexWithCipher/0/%22Bc846Ri5HK1ixqP/dzAyZq23Z/NBlcPn2UX8h38xTGINs72yF5gtU0t9fFEMxjY+DmezWt0nG7eN7RABrj697tK1nooVHYIxgDLMsjMTw5N0K+rUM823n7LcHfEoXaX8oH2E6zkg6iK5pmT8nlh6LF6Bw1G5zkluT8oTjnbFJcpEvTyT2ZKzcqptgYsE9XZiEn84zv0wjDMxSJzlM7cbe2JpLtR99mdkUf8SMVr+J0ym6Z9c02MKLP6bygWzdG9zTdkLSIxJE3R9Yt76XeRFdrbRNWkuQM/uItDsE23+8RKwZRyAScoDMwFAg+BSa6KF1tS6cJlyjxA8o5e9iWykKuHO0h1uAiapzTx9iZluOH2bVZgTUu1GABjXveMBAkrZ1eG4nVOlytsAr1oSekKvWxzyUEP2kFSrtQbg6oGECb1OMmj5bd21cx0vpDWr/juGT7/n4sBr7gYsWDvBaU7awN9Y7bcq14jtiXq/2iNNW0zoI3xe6+qByimHaiAgVoqO%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SubscriptionConnectedForComplexWithCipher&seqn=1 method: GET response: body: '[1,"Sent","14586613301466659"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForComplexWithCipher/leave?uuid=UUID_SubscriptionConnectedForComplexWithCipher&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForComplexWithCipher/leave?uuid=UUID_SubscriptionConnectedForComplexWithCipher&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_Subscribe.yaml b/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_Subscribe.yaml index 01303b89..cac1292f 100644 --- a/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forComplexMessageWithCipher_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplexWithCipher/0?uuid=UUID_SubscriptionConnectedForComplexWithCipher&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplexWithCipher/0?uuid=UUID_SubscriptionConnectedForComplexWithCipher&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586610188035175","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplexWithCipher/0?uuid=UUID_SubscriptionConnectedForComplexWithCipher&tt=14586610188035175&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplexWithCipher/0?uuid=UUID_SubscriptionConnectedForComplexWithCipher&tt=14586610188035175&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613301503994","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForComplexWithCipher","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_SubscriptionConnectedForComplexWithCipher","b":"Channel_SubscriptionConnectedForComplexWithCipher","d":"Bc846Ri5HK1ixqP/dzAyZq23Z/NBlcPn2UX8h38xTGINs72yF5gtU0t9fFEMxjY+DmezWt0nG7eN7RABrj697tK1nooVHYIxgDLMsjMTw5N0K+rUM823n7LcHfEoXaX8oH2E6zkg6iK5pmT8nlh6LF6Bw1G5zkluT8oTjnbFJcpEvTyT2ZKzcqptgYsE9XZiEn84zv0wjDMxSJzlM7cbe2JpLtR99mdkUf8SMVr+J0ym6Z9c02MKLP6bygWzdG9zTdkLSIxJE3R9Yt76XeRFdrbRNWkuQM/uItDsE23+8RKwZRyAScoDMwFAg+BSa6KF1tS6cJlyjxA8o5e9iWykKuHO0h1uAiapzTx9iZluOH2bVZgTUu1GABjXveMBAkrZ1eG4nVOlytsAr1oSekKvWxzyUEP2kFSrtQbg6oGECb1OMmj5bd21cx0vpDWr/juGT7/n4sBr7gYsWDvBaU7awN9Y7bcq14jtiXq/2iNNW0zoI3xe6+qByimHaiAgVoqO"}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplexWithCipher/0?uuid=UUID_SubscriptionConnectedForComplexWithCipher&tt=14586613301503994&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplexWithCipher/0?uuid=UUID_SubscriptionConnectedForComplexWithCipher&tt=14586613301503994&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/forComplexMessage_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/forComplexMessage_NonSubscribe.yaml index ec594a56..fd58b824 100644 --- a/messaging/tests/fixtures/subscribe/forComplexMessage_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forComplexMessage_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForComplex/0/%7B%22VersionID%22:%223.4%22,%22TimeToken%22:%2213601488652764619%22,%22OperationName%22:%22Publish%22,%22Channels%22:%5B%22ch1%22,%22ch%202%22%5D,%22DemoMessage%22:%7B%22DefaultMessage%22:%22%5C%22~%21@%23$%25%5E%5C%5Cu0026%2A%28%29_+%20%601234567890-=%20qwertyuiop%5B%5D%5C%5C%5C%5C%20%7B%7D%7C%20asdfghjkl;%27%20:%5C%5C%5C%22%20zxcvbnm,./%20%5C%5Cu003c%5C%5Cu003e%3F%20%5C%22%22%7D,%22SampleXML%22:%22%5C%22%5C%5Cu003cdata%5C%5Cu003e%5C%5Cu003cname%5C%5Cu003eDoe%5C%5Cu003c/name%5C%5Cu003e%5C%5Cu003cage%5C%5Cu003e42%5C%5Cu003c/age%5C%5Cu003e%5C%5Cu003c/data%5C%5Cu003e%5C%22%22%7D?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SubscriptionConnectedForComplex&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForComplex/0/%7B%22VersionID%22:%223.4%22,%22TimeToken%22:%2213601488652764619%22,%22OperationName%22:%22Publish%22,%22Channels%22:%5B%22ch1%22,%22ch%202%22%5D,%22DemoMessage%22:%7B%22DefaultMessage%22:%22%5C%22~%21@%23$%25%5E%5C%5Cu0026%2A%28%29_+%20%601234567890-=%20qwertyuiop%5B%5D%5C%5C%5C%5C%20%7B%7D%7C%20asdfghjkl;%27%20:%5C%5C%5C%22%20zxcvbnm,./%20%5C%5Cu003c%5C%5Cu003e%3F%20%5C%22%22%7D,%22SampleXML%22:%22%5C%22%5C%5Cu003cdata%5C%5Cu003e%5C%5Cu003cname%5C%5Cu003eDoe%5C%5Cu003c/name%5C%5Cu003e%5C%5Cu003cage%5C%5Cu003e42%5C%5Cu003c/age%5C%5Cu003e%5C%5Cu003c/data%5C%5Cu003e%5C%22%22%7D?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SubscriptionConnectedForComplex&seqn=1 method: GET response: body: '[1,"Sent","14586613295261991"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForComplex/leave?uuid=UUID_SubscriptionConnectedForComplex&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForComplex/leave?uuid=UUID_SubscriptionConnectedForComplex&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/forComplexMessage_Subscribe.yaml b/messaging/tests/fixtures/subscribe/forComplexMessage_Subscribe.yaml index 3b25265b..0313b02c 100644 --- a/messaging/tests/fixtures/subscribe/forComplexMessage_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forComplexMessage_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplex/0?uuid=UUID_SubscriptionConnectedForComplex&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplex/0?uuid=UUID_SubscriptionConnectedForComplex&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586610179764926","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplex/0?uuid=UUID_SubscriptionConnectedForComplex&tt=14586610179764926&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplex/0?uuid=UUID_SubscriptionConnectedForComplex&tt=14586610179764926&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613295253763","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForComplex","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_SubscriptionConnectedForComplex","b":"Channel_SubscriptionConnectedForComplex","d":[{"VersionID":"3.4","TimeToken":"13601488652764619","OperationName":"Publish","Channels":["ch1","ch @@ -62,5 +62,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplex/0?uuid=UUID_SubscriptionConnectedForComplex&tt=14586613295253763&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForComplex/0?uuid=UUID_SubscriptionConnectedForComplex&tt=14586613295253763&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/forMessageFiltering2_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/forMessageFiltering2_NonSubscribe.yaml index 71427948..0885c00e 100644 --- a/messaging/tests/fixtures/subscribe/forMessageFiltering2_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forMessageFiltering2_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForMessageFiltering2/0/%22Test%20message%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SubscriptionConnectedForMessageFiltering2&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForMessageFiltering2/0/%22Test%20message%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SubscriptionConnectedForMessageFiltering2&seqn=1 method: GET response: body: '[1,"Sent","14586613280726392"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForMessageFiltering2/leave?uuid=UUID_SubscriptionConnectedForMessageFiltering2&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForMessageFiltering2/leave?uuid=UUID_SubscriptionConnectedForMessageFiltering2&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/forMessageFiltering2_Subscribe.yaml b/messaging/tests/fixtures/subscribe/forMessageFiltering2_Subscribe.yaml index a0848b5f..db95ab0f 100644 --- a/messaging/tests/fixtures/subscribe/forMessageFiltering2_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forMessageFiltering2_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering2/0?uuid=UUID_SubscriptionConnectedForMessageFiltering2&tt=0&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering2/0?uuid=UUID_SubscriptionConnectedForMessageFiltering2&tt=0&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586610160063710","r":4},"m":[]}' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering2/0?uuid=UUID_SubscriptionConnectedForMessageFiltering2&tt=14586610160063710&tr=4&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering2/0?uuid=UUID_SubscriptionConnectedForMessageFiltering2&tt=14586610160063710&tr=4&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/forMessageFiltering_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/forMessageFiltering_NonSubscribe.yaml index 4bef8718..34e64b88 100644 --- a/messaging/tests/fixtures/subscribe/forMessageFiltering_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forMessageFiltering_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForMessageFiltering/0/%22Test%20message%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SubscriptionConnectedForMessageFiltering&seqn=1&meta=%22%7B%5C%22meta%5C%22:%5C%22filter%5C%22%7D%22 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForMessageFiltering/0/%22Test%20message%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SubscriptionConnectedForMessageFiltering&seqn=1&meta=%22%7B%5C%22meta%5C%22:%5C%22filter%5C%22%7D%22 method: GET response: body: '[1,"Sent","14586613280726392"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForMessageFiltering/leave?uuid=UUID_SubscriptionConnectedForMessageFiltering&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForMessageFiltering/leave?uuid=UUID_SubscriptionConnectedForMessageFiltering&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/forMessageFiltering_Subscribe.yaml b/messaging/tests/fixtures/subscribe/forMessageFiltering_Subscribe.yaml index 81badd78..6992fed5 100644 --- a/messaging/tests/fixtures/subscribe/forMessageFiltering_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forMessageFiltering_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering/0?uuid=UUID_SubscriptionConnectedForMessageFiltering&tt=0&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering/0?uuid=UUID_SubscriptionConnectedForMessageFiltering&tt=0&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586610160063710","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering/0?uuid=UUID_SubscriptionConnectedForMessageFiltering&tt=14586610160063710&tr=4&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering/0?uuid=UUID_SubscriptionConnectedForMessageFiltering&tt=14586610160063710&tr=4&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613280736475","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForMessageFiltering","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_SubscriptionConnectedForMessageFiltering","b":"Channel_SubscriptionConnectedForMessageFiltering","d":"Test message"}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering/0?uuid=UUID_SubscriptionConnectedForMessageFiltering&tt=14586613280736475&tr=4&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForMessageFiltering/0?uuid=UUID_SubscriptionConnectedForMessageFiltering&tt=14586613280736475&tr=4&filter-expr=%7B%22meta%22%3A%22filter%22%7D&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_NonSubscribe.yaml index 30854df1..c1fde140 100644 --- a/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForSimpleWithCipher/0/%22HSoHp4g0o/uHfiS1PYXzWw==%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SubscriptionConnectedForSimpleWithCipher&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForSimpleWithCipher/0/%22HSoHp4g0o/uHfiS1PYXzWw==%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SubscriptionConnectedForSimpleWithCipher&seqn=1 method: GET response: body: '[1,"Sent","14586613284451342"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForSimpleWithCipher/leave?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForSimpleWithCipher/leave?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_Subscribe.yaml b/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_Subscribe.yaml index 4d38e052..ce2c292f 100644 --- a/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forSimpleMessageWithCipher_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimpleWithCipher/0?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimpleWithCipher/0?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586610176891624","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimpleWithCipher/0?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&tt=14586610176891624&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimpleWithCipher/0?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&tt=14586610176891624&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613284460865","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForSimpleWithCipher","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_SubscriptionConnectedForSimpleWithCipher","b":"Channel_SubscriptionConnectedForSimpleWithCipher","d":"HSoHp4g0o/uHfiS1PYXzWw=="}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimpleWithCipher/0?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&tt=14586613284460865&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimpleWithCipher/0?uuid=UUID_SubscriptionConnectedForSimpleWithCipher&tt=14586613284460865&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/forSimpleMessage_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/forSimpleMessage_NonSubscribe.yaml index fa03e702..ffeb4272 100644 --- a/messaging/tests/fixtures/subscribe/forSimpleMessage_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forSimpleMessage_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForSimple/0/%22Test%20message%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SubscriptionConnectedForSimple&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscriptionConnectedForSimple/0/%22Test%20message%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SubscriptionConnectedForSimple&seqn=1 method: GET response: body: '[1,"Sent","14586613280726392"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForSimple/leave?uuid=UUID_SubscriptionConnectedForSimple&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscriptionConnectedForSimple/leave?uuid=UUID_SubscriptionConnectedForSimple&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/forSimpleMessage_Subscribe.yaml b/messaging/tests/fixtures/subscribe/forSimpleMessage_Subscribe.yaml index 43371039..3c6ec066 100644 --- a/messaging/tests/fixtures/subscribe/forSimpleMessage_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/forSimpleMessage_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimple/0?uuid=UUID_SubscriptionConnectedForSimple&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimple/0?uuid=UUID_SubscriptionConnectedForSimple&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586610160063710","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimple/0?uuid=UUID_SubscriptionConnectedForSimple&tt=14586610160063710&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimple/0?uuid=UUID_SubscriptionConnectedForSimple&tt=14586610160063710&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613280736475","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForSimple","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_SubscriptionConnectedForSimple","b":"Channel_SubscriptionConnectedForSimple","d":"Test message"}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimple/0?uuid=UUID_SubscriptionConnectedForSimple&tt=14586613280736475&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscriptionConnectedForSimple/0?uuid=UUID_SubscriptionConnectedForSimple&tt=14586613280736475&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_NonSubscribe.yaml index 0bb8bda4..990bcb9e 100644 --- a/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_time_uuid + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_time_uuid method: GET response: body: '[14591685625761723]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22NEzif8UOAV1bxmYio4KPAw==%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_MultipleResponse&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22NEzif8UOAV1bxmYio4KPAw==%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_MultipleResponse&seqn=1 method: GET response: body: '[1,"Sent","14591685626031015"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22xXch1+uwbgGgLOudCKzFSw==%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_MultipleResponse&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22xXch1+uwbgGgLOudCKzFSw==%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_MultipleResponse&seqn=2 method: GET response: body: '[1,"Sent","14591685626282978"]' @@ -95,8 +95,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_MultipleResponse/leave?uuid=UUID_MultipleResponse&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_MultipleResponse/leave?uuid=UUID_MultipleResponse&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_Subscribe.yaml b/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_Subscribe.yaml index 12fc17c1..4ca5d5c5 100644 --- a/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/multipleResponseEncrypted_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685625761723&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685625761723&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14591685620543810","r":4},"m":[{"a":"5","f":0,"i":"UUID_MultipleResponse","s":2,"p":{"t":"14772988006938898","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_MultipleResponse","d":"NEzif8UOAV1bxmYio4KPAw=="},{"a":"5","f":0,"i":"UUID_MultipleResponse","s":3,"p":{"t":"14772988006938898","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_MultipleResponse","d":"xXch1+uwbgGgLOudCKzFSw=="}]}' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685620543810&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685620543810&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/multipleResponse_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/multipleResponse_NonSubscribe.yaml index c5db7258..f706a01f 100644 --- a/messaging/tests/fixtures/subscribe/multipleResponse_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/multipleResponse_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=timeGetter_time_uuid + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=timeGetter_time_uuid method: GET response: body: '[14591685625761723]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22message1%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_MultipleResponse&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22message1%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_MultipleResponse&seqn=1 method: GET response: body: '[1,"Sent","14591685620840142"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22message2%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_MultipleResponse&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_MultipleResponse/0/%22message2%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_MultipleResponse&seqn=2 method: GET response: body: '[1,"Sent","14591685621098006"]' @@ -95,8 +95,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_MultipleResponse/leave?uuid=UUID_MultipleResponse&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_MultipleResponse/leave?uuid=UUID_MultipleResponse&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/multipleResponse_Subscribe.yaml b/messaging/tests/fixtures/subscribe/multipleResponse_Subscribe.yaml index a71634c1..388c55a1 100644 --- a/messaging/tests/fixtures/subscribe/multipleResponse_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/multipleResponse_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685625761723&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685625761723&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14591685620543810","r":4},"m":[{"a":"5","f":0,"i":"UUID_MultipleResponse","s":2,"p":{"t":"14772988006938898","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_MultipleResponse","d":"message1"},{"a":"5","f":0,"i":"UUID_MultipleResponse","s":3,"p":{"t":"14772988006938898","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_MultipleResponse","d":"message2"}]}' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685620543810&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_MultipleResponse/0?uuid=UUID_MultipleResponse&tt=14591685620543810&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/notPermitted_Subscribe.yaml b/messaging/tests/fixtures/subscribe/notPermitted_Subscribe.yaml index c5b4b0a8..f690ba28 100644 --- a/messaging/tests/fixtures/subscribe/notPermitted_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/notPermitted_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-642a6fca-f5b9-11e5-9086-02ee2ddab7fe/Channel_NotPermitted/0?uuid=UUID_NotPermitted&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-642a6fca-f5b9-11e5-9086-02ee2ddab7fe/Channel_NotPermitted/0?uuid=UUID_NotPermitted&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: | diff --git a/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_NonSubscribe.yaml index 8cb26883..6d1da947 100644 --- a/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_1/0/%22NEzif8UOAV1bxmYio4KPAw==%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiplexing&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_1/0/%22NEzif8UOAV1bxmYio4KPAw==%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiplexing&seqn=1 method: GET response: body: '[1,"Sent","14586613347001022"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_2/0/%22xXch1+uwbgGgLOudCKzFSw==%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiplexing&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_2/0/%22xXch1+uwbgGgLOudCKzFSw==%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiplexing&seqn=2 method: GET response: body: '[1,"Sent","14586613349957842"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Mpx_Channel_1,Mpx_Channel_2/leave?uuid=UUID_Multiplexing&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Mpx_Channel_1,Mpx_Channel_2/leave?uuid=UUID_Multiplexing&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_Subscribe.yaml b/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_Subscribe.yaml index 3823861a..bae46a78 100644 --- a/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/testEncryptedMultiplexing_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613343837041","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613343837041&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613343837041&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613347010329","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForSimpleWithCipher","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Mpx_Channel_1","b":"Mpx_Channel_1","d":"NEzif8UOAV1bxmYio4KPAw=="}]}' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613347010329&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613347010329&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613349948803","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForSimpleWithCipher","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Mpx_Channel_2","b":"Mpx_Channel_2","d":"xXch1+uwbgGgLOudCKzFSw=="}]}' @@ -89,5 +89,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613349948803&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613349948803&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribe/testMultiplexing_NonSubscribe.yaml b/messaging/tests/fixtures/subscribe/testMultiplexing_NonSubscribe.yaml index caefaaa9..fde4accc 100644 --- a/messaging/tests/fixtures/subscribe/testMultiplexing_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribe/testMultiplexing_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_1/0/%22message1%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiplexing&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_1/0/%22message1%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiplexing&seqn=1 method: GET response: body: '[1,"Sent","14586613343582704"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_2/0/%22message2%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_Multiplexing&seqn=2 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Mpx_Channel_2/0/%22message2%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_Multiplexing&seqn=2 method: GET response: body: '[1,"Sent","14586613343830841"]' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Mpx_Channel_1,Mpx_Channel_2/leave?uuid=UUID_Multiplexing&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Mpx_Channel_1,Mpx_Channel_2/leave?uuid=UUID_Multiplexing&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/subscribe/testMultiplexing_Subscribe.yaml b/messaging/tests/fixtures/subscribe/testMultiplexing_Subscribe.yaml index a86d00ec..656c405b 100644 --- a/messaging/tests/fixtures/subscribe/testMultiplexing_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribe/testMultiplexing_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586610210555993","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586610210555993&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586610210555993&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613343588074","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForSimpleWithCipher","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Mpx_Channel_1","b":"Mpx_Channel_1","d":"message1"}]}' @@ -66,8 +66,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613343588074&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613343588074&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14586613343837041","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscriptionConnectedForSimpleWithCipher","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Mpx_Channel_2","b":"Mpx_Channel_2","d":"message2"}]}' @@ -89,5 +89,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613343837041&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Mpx_Channel_1,Mpx_Channel_2/0?uuid=UUID_Multiplexing&tt=14586613343837041&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_NonSubscribe.yaml b/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_NonSubscribe.yaml index 763e0b42..1cd24ddf 100644 --- a/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_NonSubscribe.yaml +++ b/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-642a6fca-f5b9-11e5-9086-02ee2ddab7fe/channel/Channel_NotPermitted/leave?uuid=UUID_NotPermitted&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-642a6fca-f5b9-11e5-9086-02ee2ddab7fe/channel/Channel_NotPermitted/leave?uuid=UUID_NotPermitted&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: | diff --git a/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_Subscribe.yaml b/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_Subscribe.yaml index b86d84fb..635c5d9f 100644 --- a/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_Subscribe.yaml +++ b/messaging/tests/fixtures/subscribeErrors/chnnelNotPermitted_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-642a6fca-f5b9-11e5-9086-02ee2ddab7fe/Channel_NotPermitted/0?uuid=UUID_NotPermitted&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-642a6fca-f5b9-11e5-9086-02ee2ddab7fe/Channel_NotPermitted/0?uuid=UUID_NotPermitted&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: | diff --git a/messaging/tests/fixtures/time_NonSubscribe.yaml b/messaging/tests/fixtures/time_NonSubscribe.yaml index 4da0c371..6c97a0ea 100644 --- a/messaging/tests/fixtures/time_NonSubscribe.yaml +++ b/messaging/tests/fixtures/time_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.10.0&uuid=testTime + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/time/0?pnsdk=PubNub-Go%2F3.11.0&uuid=testTime method: GET response: body: '[14601341825375121]' diff --git a/messaging/tests/fixtures/unsubscribe/channel_NonSubscribe.yaml b/messaging/tests/fixtures/unsubscribe/channel_NonSubscribe.yaml index 97a14f94..cd80dd27 100644 --- a/messaging/tests/fixtures/unsubscribe/channel_NonSubscribe.yaml +++ b/messaging/tests/fixtures/unsubscribe/channel_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_UnsubscribeChannel/leave?uuid=UUID_UnsubscribeChannel&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_UnsubscribeChannel/leave?uuid=UUID_UnsubscribeChannel&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/unsubscribe/channel_Subscribe.yaml b/messaging/tests/fixtures/unsubscribe/channel_Subscribe.yaml index 589580b8..8b8b9d5d 100644 --- a/messaging/tests/fixtures/unsubscribe/channel_Subscribe.yaml +++ b/messaging/tests/fixtures/unsubscribe/channel_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeChannel/0?uuid=UUID_UnsubscribeChannel&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeChannel/0?uuid=UUID_UnsubscribeChannel&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14588085243624598"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeChannel/0?uuid=UUID_UnsubscribeChannell&tt=14588085243624598&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeChannel/0?uuid=UUID_UnsubscribeChannell&tt=14588085243624598&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/unsubscribe/groupNetworkError_NonSubscribe.yaml b/messaging/tests/fixtures/unsubscribe/groupNetworkError_NonSubscribe.yaml index d64e69e6..b691d24f 100644 --- a/messaging/tests/fixtures/unsubscribe/groupNetworkError_NonSubscribe.yaml +++ b/messaging/tests/fixtures/unsubscribe/groupNetworkError_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Channel_GroupUnsubscribeNetError?add=adsf&pnsdk=PubNub-Go%2F3.10.0&uuid=6c06fbed40608e0080576f7f22665b3d + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Channel_GroupUnsubscribeNetError?add=adsf&pnsdk=PubNub-Go%2F3.11.0&uuid=6c06fbed40608e0080576f7f22665b3d method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": @@ -44,8 +44,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Channel_GroupUnsubscribeNetError/remove?pnsdk=PubNub-Go%2F3.10.0&uuid=6c06fbed40608e0080576f7f22665b3d + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v1/channel-registration/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel-group/Channel_GroupUnsubscribeNetError/remove?pnsdk=PubNub-Go%2F3.11.0&uuid=6c06fbed40608e0080576f7f22665b3d method: GET response: body: '{"status": 200, "message": "OK", "service": "channel-registry", "error": diff --git a/messaging/tests/fixtures/unsubscribe/groupNetworkError_Subscribe.yaml b/messaging/tests/fixtures/unsubscribe/groupNetworkError_Subscribe.yaml index b15b11d9..8a80f307 100644 --- a/messaging/tests/fixtures/unsubscribe/groupNetworkError_Subscribe.yaml +++ b/messaging/tests/fixtures/unsubscribe/groupNetworkError_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Channel_GroupUnsubscribeNetError&tt=0&uuid=ed80209240a2c5b38037801644ec1c42&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Channel_GroupUnsubscribeNetError&tt=0&uuid=ed80209240a2c5b38037801644ec1c42&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14606269433069896"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Channel_GroupUnsubscribeNetError&tt=14606269433069896&uuid=ed80209240a2c5b38037801644ec1c42&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/,/0?channel-group=Channel_GroupUnsubscribeNetError&tt=14606269433069896&uuid=ed80209240a2c5b38037801644ec1c42&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/unsubscribe/networkError_Subscribe.yaml b/messaging/tests/fixtures/unsubscribe/networkError_Subscribe.yaml index db21ef9d..3406f58d 100644 --- a/messaging/tests/fixtures/unsubscribe/networkError_Subscribe.yaml +++ b/messaging/tests/fixtures/unsubscribe/networkError_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeNetError/0?uuid=4bca841940f39f0b8004e66932a757a8&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeNetError/0?uuid=4bca841940f39f0b8004e66932a757a8&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14606235420433764"]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeNetError/0?uuid=4bca841940f39f0b8004e66932a757a8&tt=14606235420433764&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_UnsubscribeNetError/0?uuid=4bca841940f39f0b8004e66932a757a8&tt=14606235420433764&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/wildcard/connAndUns_NonSubscribe.yaml b/messaging/tests/fixtures/wildcard/connAndUns_NonSubscribe.yaml index 916a7a93..9b6423a9 100644 --- a/messaging/tests/fixtures/wildcard/connAndUns_NonSubscribe.yaml +++ b/messaging/tests/fixtures/wildcard/connAndUns_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ConnAndUns.%2A/leave?uuid=UUID_ConnAndUns&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_ConnAndUns.%2A/leave?uuid=UUID_ConnAndUns&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/wildcard/connAndUns_Subscribe.yaml b/messaging/tests/fixtures/wildcard/connAndUns_Subscribe.yaml index bd6322ac..7a130d15 100644 --- a/messaging/tests/fixtures/wildcard/connAndUns_Subscribe.yaml +++ b/messaging/tests/fixtures/wildcard/connAndUns_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnAndUns.%2A/0?uuid=UUID_ConnAndUns&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnAndUns.%2A/0?uuid=UUID_ConnAndUns&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '[[],"14588984225303044","",""]' @@ -31,5 +31,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnAndUns.%2A/0?uuid=UUID_ConnAndUns&tt=14588984225303044&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_ConnAndUns.%2A/0?uuid=UUID_ConnAndUns&tt=14588984225303044&pnsdk=PubNub-Go%2F3.11.0 : {} diff --git a/messaging/tests/fixtures/wildcard/message_NonSubscribe.yaml b/messaging/tests/fixtures/wildcard/message_NonSubscribe.yaml index f5303f81..9be6ca6b 100644 --- a/messaging/tests/fixtures/wildcard/message_NonSubscribe.yaml +++ b/messaging/tests/fixtures/wildcard/message_NonSubscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscribeMajor.Channel_SubscribeMinor/0/%22hey%22?pnsdk=PubNub-Go%2F3.10.0&uuid=UUID_SubscribeMajor&seqn=1 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/publish/pub-c-071e1a3f-607f-4351-bdd1-73a8eb21ba7c/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/0/Channel_SubscribeMajor.Channel_SubscribeMinor/0/%22hey%22?pnsdk=PubNub-Go%2F3.11.0&uuid=UUID_SubscribeMajor&seqn=1 method: GET response: body: '[1,"Sent","14593254434918107"]' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscribeMajor.%2A/leave?uuid=UUID_SubscribeMajor&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/presence/sub-key/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/channel/Channel_SubscribeMajor.%2A/leave?uuid=UUID_SubscribeMajor&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"status": 200, "action": "leave", "message": "OK", "service": "Presence"}' diff --git a/messaging/tests/fixtures/wildcard/message_Subscribe.yaml b/messaging/tests/fixtures/wildcard/message_Subscribe.yaml index eee9448c..8352be1c 100644 --- a/messaging/tests/fixtures/wildcard/message_Subscribe.yaml +++ b/messaging/tests/fixtures/wildcard/message_Subscribe.yaml @@ -8,8 +8,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscribeMajor.%2A/0?uuid=UUID_SubscribeMajor&tt=0&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscribeMajor.%2A/0?uuid=UUID_SubscribeMajor&tt=0&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14593254433632098","r":4},"m":[]}' @@ -37,8 +37,8 @@ interactions: Accept-Encoding: - gzip User-Agent: - - ua_string=(linux) PubNub-Go/3.10.0 - url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscribeMajor.%2A/0?uuid=UUID_SubscribeMajor&tt=14593254433632098&tr=4&pnsdk=PubNub-Go%2F3.10.0 + - ua_string=(linux) PubNub-Go/3.11.0 + url: http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscribeMajor.%2A/0?uuid=UUID_SubscribeMajor&tt=14593254433632098&tr=4&pnsdk=PubNub-Go%2F3.11.0 method: GET response: body: '{"t":{"t":"14593254434932405","r":4},"m":[{"a":"1","f":0,"i":"UUID_SubscribeMajor","s":1,"p":{"t":"14593254434932405","r":4},"k":"sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f","c":"Channel_SubscribeMajor.Channel_SubscribeMinor","b":"Channel_SubscribeMajor.*","d":["hey"]}]}' @@ -60,5 +60,5 @@ interactions: status: 200 OK code: 200 unclosed_requests: - ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscribeMajor.%2A/0?uuid=UUID_SubscribeMajor&tt=14593254434932405&tr=4&pnsdk=PubNub-Go%2F3.10.0 + ? http://ps.pndsn.com/v2/subscribe/sub-c-5c4fdcc6-c040-11e5-a316-0619f8945a4f/Channel_SubscribeMajor.%2A/0?uuid=UUID_SubscribeMajor&tt=14593254434932405&tr=4&pnsdk=PubNub-Go%2F3.11.0 : {} From 9cc9f477eb28266b01d711213379ee4fc1e2e870 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Mon, 13 Mar 2017 22:00:07 +0530 Subject: [PATCH 04/21] publish queue --- .pubnub.yml | 2 +- messaging/examples/cli/pubnubExample.go | 297 +++++++++++++++--------- messaging/publish_queue_worker.go | 120 ++++++++++ messaging/pubnub.go | 58 ++++- 4 files changed, 357 insertions(+), 120 deletions(-) create mode 100644 messaging/publish_queue_worker.go diff --git a/.pubnub.yml b/.pubnub.yml index 2b76d050..fbd58568 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -12,7 +12,7 @@ changelog: text: “Fix use of escaping JSON during publish” type: improvement date: Feb 22, 17 - version: v3.11.0 + version: v3.10.0 - changes: - diff --git a/messaging/examples/cli/pubnubExample.go b/messaging/examples/cli/pubnubExample.go index ed8c1f2b..9b4caa3e 100644 --- a/messaging/examples/cli/pubnubExample.go +++ b/messaging/examples/cli/pubnubExample.go @@ -5,17 +5,18 @@ package main import ( "bufio" "encoding/binary" + "encoding/json" "fmt" + "github.com/pubnub/go/messaging" "log" "math/big" "os" + "runtime" "strconv" "strings" "time" "unicode/utf16" "unicode/utf8" - - "github.com/pubnub/go/messaging" ) // connectChannels: the connected pubnub channels, multiple channels are stored separated by comma. @@ -31,13 +32,13 @@ var cipher = "" var uuid = "" // -var publishKey = "demo" +var publishKey = "demo-36" // -var subscribeKey = "demo" +var subscribeKey = "demo-36" // -var secretKey = "demo" +var secretKey = "demo-36" // a boolean to capture user preference of displaying errors. var displayError = true @@ -79,129 +80,133 @@ func Init() (b bool) { fmt.Println(err) } else { connectChannels = string(line) - if strings.TrimSpace(connectChannels) != "" { - fmt.Println("Channel: ", connectChannels) - fmt.Println("Enable SSL? Enter n for No, y for Yes") - var enableSsl string - fmt.Scanln(&enableSsl) - - if enableSsl == "n" || enableSsl == "N" { - ssl = false - fmt.Println("SSL disabled") - } else { - ssl = true - fmt.Println("SSL enabled") - } - fmt.Println("Please enter a subscribe key, leave blank for default key.") - fmt.Scanln(&subscribeKey) + if len(strings.TrimSpace(connectChannels)) == 0 { + connectChannels = "test" + } + fmt.Println("Channel: ", connectChannels) + fmt.Println("Enable SSL? Enter n for No, y for Yes") + var enableSsl string + fmt.Scanln(&enableSsl) + + if enableSsl == "n" || enableSsl == "N" { + ssl = false + fmt.Println("SSL disabled") + } else { + ssl = true + fmt.Println("SSL enabled") + } - if strings.TrimSpace(subscribeKey) == "" { - subscribeKey = "demo" - } - fmt.Println("Subscribe Key: ", subscribeKey) - fmt.Println("") + fmt.Println("Please enter a subscribe key, leave blank for default key.") + fmt.Scanln(&subscribeKey) - fmt.Println("Please enter a publish key, leave blank for default key.") - fmt.Scanln(&publishKey) - if strings.TrimSpace(publishKey) == "" { - publishKey = "demo" - } - fmt.Println("Publish Key: ", publishKey) - fmt.Println("") + if strings.TrimSpace(subscribeKey) == "" { + subscribeKey = "demo" + } + fmt.Println("Subscribe Key: ", subscribeKey) + fmt.Println("") - fmt.Println("Please enter a secret key, leave blank for default key.") - fmt.Scanln(&secretKey) - if strings.TrimSpace(secretKey) == "" { - secretKey = "demo" - } - fmt.Println("Secret Key: ", secretKey) - fmt.Println("") + fmt.Println("Please enter a publish key, leave blank for default key.") + fmt.Scanln(&publishKey) + if strings.TrimSpace(publishKey) == "" { + publishKey = "demo" + } + fmt.Println("Publish Key: ", publishKey) + fmt.Println("") - fmt.Println("Please enter a CIPHER key, leave blank if you don't want to use this.") - fmt.Scanln(&cipher) - fmt.Println("Cipher: ", cipher) + fmt.Println("Please enter a secret key, leave blank for default key.") + fmt.Scanln(&secretKey) + if strings.TrimSpace(secretKey) == "" { + secretKey = "demo" + } + fmt.Println("Secret Key: ", secretKey) + fmt.Println("") - fmt.Println("Please enter a Custom UUID, leave blank for default.") - fmt.Scanln(&uuid) - fmt.Println("UUID: ", uuid) + fmt.Println("Please enter a CIPHER key, leave blank if you don't want to use this.") + fmt.Scanln(&cipher) + fmt.Println("Cipher: ", cipher) - fmt.Println("Display error messages? Enter y for Yes, n for No. Default is Yes") - var enableErrorMessages = "y" - fmt.Scanln(&enableErrorMessages) + fmt.Println("Please enter a Custom UUID, leave blank for default.") + fmt.Scanln(&uuid) + fmt.Println("UUID: ", uuid) - if enableErrorMessages == "y" || enableErrorMessages == "Y" { - displayError = true - fmt.Println("Error messages will be displayed") - } else { - displayError = false - fmt.Println("Error messages will not be displayed") - } + fmt.Println("Display error messages? Enter y for Yes, n for No. Default is Yes") + var enableErrorMessages = "y" + fmt.Scanln(&enableErrorMessages) + + if enableErrorMessages == "y" || enableErrorMessages == "Y" { + displayError = true + fmt.Println("Error messages will be displayed") + } else { + displayError = false + fmt.Println("Error messages will not be displayed") + } - fmt.Println("Enable resume on reconnect? Enter y for Yes, n for No. Default is Yes") - var enableResumeOnReconnect = "y" - fmt.Scanln(&enableResumeOnReconnect) + fmt.Println("Enable resume on reconnect? Enter y for Yes, n for No. Default is Yes") + var enableResumeOnReconnect = "y" + fmt.Scanln(&enableResumeOnReconnect) - if enableResumeOnReconnect == "y" || enableResumeOnReconnect == "Y" { - messaging.SetResumeOnReconnect(true) - fmt.Println("Resume on reconnect enabled") - } else { - messaging.SetResumeOnReconnect(false) - fmt.Println("Resume on reconnect disabled") - } + if enableResumeOnReconnect == "y" || enableResumeOnReconnect == "Y" { + messaging.SetResumeOnReconnect(true) + fmt.Println("Resume on reconnect enabled") + } else { + messaging.SetResumeOnReconnect(false) + fmt.Println("Resume on reconnect disabled") + } - fmt.Println("Set subscribe timeout? Enter numerals.") - var subscribeTimeout = "" - fmt.Scanln(&subscribeTimeout) - val, err := strconv.Atoi(subscribeTimeout) - if err != nil { - fmt.Println("Entered value is invalid. Using default value.") - } else { - messaging.SetSubscribeTimeout(uint16(val)) - } + fmt.Println("Set subscribe timeout? Enter numerals.") + var subscribeTimeout = "" + fmt.Scanln(&subscribeTimeout) + val, err := strconv.Atoi(subscribeTimeout) + if err != nil { + fmt.Println("Entered value is invalid. Using default value.") + } else { + messaging.SetSubscribeTimeout(uint16(val)) + } - fmt.Println("Enable logging? Enter y for Yes, n for No. Default is Yes") - var enableLogging = "y" - fmt.Scanln(&enableLogging) + fmt.Println("Enable logging? Enter y for Yes, n for No. Default is Yes") + var enableLogging = "y" + fmt.Scanln(&enableLogging) - var infoLogger *log.Logger + var infoLogger *log.Logger - if enableLogging == "y" || enableLogging == "Y" { - logfileName := "pubnubMessaging.log" - f, err := os.OpenFile(logfileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) - if err != nil { + if enableLogging == "y" || enableLogging == "Y" { + logfileName := "pubnubMessaging.log" + f, err := os.OpenFile(logfileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) + if err != nil { - fmt.Println("error opening file: ", err.Error()) - fmt.Println("Logging disabled") - } else { - fmt.Println("Logging enabled writing to ", logfileName) - infoLogger = log.New(f, "", log.Ldate|log.Ltime|log.Lshortfile) - } - } else { + fmt.Println("error opening file: ", err.Error()) fmt.Println("Logging disabled") + } else { + fmt.Println("Logging enabled writing to ", logfileName) + infoLogger = log.New(f, "", log.Ldate|log.Ltime|log.Lshortfile) } + } else { + fmt.Println("Logging disabled") + } - messaging.SetOrigin("ps.pndsn.com") + messaging.SetOrigin("balancer-tj71.devbuild.aws-pdx-1.ps.pn") + //messaging.SetOrigin("ps.pndsn.com") - var pubInstance = messaging.NewPubnub(publishKey, subscribeKey, secretKey, cipher, ssl, uuid, infoLogger) + var pubInstance = messaging.NewPubnub(publishKey, subscribeKey, secretKey, cipher, ssl, uuid, infoLogger) - pub = pubInstance + pub = pubInstance - SetupProxy() + SetupProxy() - presenceHeartbeat := askNumber16("Presence Heartbeat", true) - pub.SetPresenceHeartbeat(presenceHeartbeat) - fmt.Println(fmt.Sprintf("Presence Heartbeat set to :%d", pub.GetPresenceHeartbeat())) + presenceHeartbeat := askNumber16("Presence Heartbeat", true) + pub.SetPresenceHeartbeat(presenceHeartbeat) + fmt.Println(fmt.Sprintf("Presence Heartbeat set to :%d", pub.GetPresenceHeartbeat())) - presenceHeartbeatInterval := askNumber16("Presence Heartbeat Interval", true) - pub.SetPresenceHeartbeat(presenceHeartbeatInterval) - fmt.Println(fmt.Sprintf("Presence Heartbeat set to :%d", pub.GetPresenceHeartbeat())) + presenceHeartbeatInterval := askNumber16("Presence Heartbeat Interval", true) + pub.SetPresenceHeartbeat(presenceHeartbeatInterval) + fmt.Println(fmt.Sprintf("Presence Heartbeat set to :%d", pub.GetPresenceHeartbeat())) - fmt.Println("Pubnub instance initialized") + fmt.Println("Pubnub instance initialized") - return true - } - fmt.Println("Channel cannot be empty.") + return true + //} + //fmt.Println("Channel cannot be empty.") } return false } @@ -661,15 +666,37 @@ func ReadLoop() { } case "333": //for test + fmt.Printf("goroutines start: %d\n", runtime.NumGoroutine()) channels, errReadingChannel := askChannel() if errReadingChannel != nil { fmt.Println("errReadingChannel: ", errReadingChannel) } else { - for i := 0; i < 100; i++ { - go publishRoutine(channels, fmt.Sprintf("%d", i)) - } + + go func() { + for i := 0; i < 100; i++ { + publishRoutine(channels, fmt.Sprintf("%d", i)) + } + }() } + fmt.Printf("goroutines end: %d\n", runtime.NumGoroutine()) + case "3333": + //for test + fmt.Printf("goroutines start: %d\n", runtime.NumGoroutine()) + channels, errReadingChannel := askChannel() + + if errReadingChannel != nil { + fmt.Println("errReadingChannel: ", errReadingChannel) + } else { + nu := askNumber("number of messages to publish") + go func() { + for i := 0; i < int(nu); i++ { + publishRoutine(channels, fmt.Sprintf("%d", i)) + } + }() + } + fmt.Printf("goroutines end: %d\n", runtime.NumGoroutine()) case "3": + fmt.Printf("goroutines start: %d\n", runtime.NumGoroutine()) channels, errReadingChannel := askChannel() if errReadingChannel != nil { fmt.Println("errReadingChannel: ", errReadingChannel) @@ -704,6 +731,14 @@ func ReadLoop() { fmt.Println("Running detailed history") go detailedHistoryRoutine(channels) } + case "55": + channels, errReadingChannel := askChannel() + if errReadingChannel != nil { + fmt.Println("errReadingChannel: ", errReadingChannel) + } else { + fmt.Println("Running detailed history") + go getAllMessages(0, channels) + } case "6": channels, errReadingChannel := askChannel() if errReadingChannel != nil { @@ -1424,8 +1459,8 @@ func handleResult(successChannel, errorChannel chan []byte, timeoutVal uint16, a break } if string(success) != "[]" { - fmt.Println(fmt.Sprintf("%s Response: %s ", action, success)) - fmt.Println("") + //fmt.Println(fmt.Sprintf("%s Response: %s ", action, success)) + //fmt.Println("") } return case failure, ok := <-errorChannel: @@ -1507,6 +1542,52 @@ func detailedHistoryRoutine(channels string) { } } +func getAllMessages(timetoken int64, channel string) { + successChannel := make(chan []byte) + errorChannel := make(chan []byte) + count := 100 + + for { + go pub.History(channel, count, timetoken, 0, false, false, successChannel, errorChannel) + + select { + case response := <-successChannel: + var parsed []interface{} + + err := json.Unmarshal(response, &parsed) + if err != nil { + fmt.Println(err.Error()) + } + + msgs := parsed[0].([]interface{}) + startString := parsed[1].(string) + start, err := strconv.Atoi(startString) + //endString := parsed[2].(string) + //end, err := strconv.Atoi(endString) + length := len(msgs) + + if length > 0 { + fmt.Println(msgs) + //fmt.Println(length) + //fmt.Println("start:", start) + //fmt.Println("end:", end) + } + + if length == 100 { + timetoken = int64(start) + } else { + return + } + case err := <-errorChannel: + fmt.Println(string(err)) + return + case <-messaging.Timeout(): + fmt.Println("History() timeout") + return + } + } +} + func globalHereNowRoutine(showUuid bool, includeUserState bool) { fmt.Println("Global here now ", uuid) var errorChannel = make(chan []byte) diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go new file mode 100644 index 00000000..f0a85269 --- /dev/null +++ b/messaging/publish_queue_worker.go @@ -0,0 +1,120 @@ +package messaging + +import ( +//"time" +) + +type PublishJob struct { + Channel string + PublishURL string + CallbackChannel chan []byte + ErrorChannel chan []byte +} + +type PublishWorker struct { + Workers chan chan PublishJob + JobChannel chan PublishJob + quit chan bool +} + +type PublishQueueProcessor struct { + Workers chan chan PublishJob + maxWorkers int + Sem chan bool +} + +func NewPublishWorker(workers chan chan PublishJob) PublishWorker { + return PublishWorker{ + Workers: workers, + JobChannel: make(chan PublishJob), + } +} + +func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { + go func() { + for { + pw.Workers <- pw.JobChannel + pubnub.infoLogger.Println("INFO: StartPublishWorker: Got job") + select { + case publishJob := <-pw.JobChannel: + pubnub.infoLogger.Println("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) + value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) + pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + } + } + }() +} + +func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { + //func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) *PublishQueueProcessor { + workers := make(chan chan PublishJob, maxWorkers) + sem := make(chan bool, maxWorkers) + pubnub.infoLogger.Println("INFO: Init PublishQueueProcessor: workers %d", maxWorkers) + + p := &PublishQueueProcessor{ + Workers: workers, + maxWorkers: maxWorkers, + Sem: sem, + } + p.Run(pubnub) + //go p.process(pubnub) + //return p +} + +func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { + //func (p *PublishQueueProcessor) Run(pubnub *Pubnub, publishJob PublishJob) { + pubnub.infoLogger.Println("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) + for i := 0; i < p.maxWorkers; i++ { + pubnub.infoLogger.Println("INFO: PublishQueueProcessor: StartPublishWorker %d", i) + publishWorker := NewPublishWorker(p.Workers) + publishWorker.StartPublishWorker(pubnub) + } + go p.process(pubnub) + /*p.Sem <- true + go func(publishJob PublishJob) { + pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Got job %d", publishJob.PublishURL) + defer func() { <-p.Sem }() + // get the url + pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) + value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) + pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + + }(publishJob) + for i := 0; i < cap(p.Sem); i++ { + p.Sem <- true + }*/ +} + +func (p *PublishQueueProcessor) process(pubnub *Pubnub) { + for { + select { + case publishJob := <-pubnub.publishJobQueue: + pubnub.infoLogger.Println("INFO: PublishQueueProcessor process: Got job %d", publishJob.PublishURL) + go func(publishJob PublishJob) { + jobChannel := <-p.Workers + jobChannel <- publishJob + }(publishJob) + /*pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Got job, check sem %d len:%d", publishJob.PublishURL, len(pubnub.publishJobQueue)) + p.Sem <- true + go func(publishJob PublishJob) { + defer func() { + pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) + b := <-p.Sem + pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: After Defer job %d", b) + }() + // get the url + pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) + value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) + pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + + }(publishJob) + /*for i := 0; i < cap(p.Sem); i++ { + p.Sem <- true + }*/ + } + } +} + +func (p *PublishQueueProcessor) Close(pubnub *Pubnub) { + close(p.Workers) +} diff --git a/messaging/pubnub.go b/messaging/pubnub.go index 5bbf9a1e..b96c8c80 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -5,6 +5,7 @@ package messaging import ( "bytes" + //"context" "crypto/aes" "crypto/cipher" "crypto/hmac" @@ -15,8 +16,8 @@ import ( "encoding/json" "errors" "fmt" - "golang.org/x/net/context" - "golang.org/x/time/rate" + //"golang.org/x/net/context" + //"golang.org/x/time/rate" "io" "io/ioutil" "log" @@ -304,9 +305,15 @@ type Pubnub struct { nonSubscribeWorker *requestWorker retryWorker *requestWorker publishHTTPClient *http.Client - limiter *rate.Limiter - ctx context.Context + maxWorkers int + maxQueue int infoLogger *log.Logger + publishJobQueue chan PublishJob + //pqp *PublishQueueProcessor + //limiter *rate.Limiter + //sem chan bool + //ctx context.Context + } // PubnubUnitTest structure used to expose some data for unit tests. @@ -396,9 +403,14 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK nonSubscribeTimeout, newPubnub.infoLogger) newPubnub.retryWorker = newRequestWorker("Retry", retryTransport, retryInterval, newPubnub.infoLogger) newPubnub.publishHTTPClient = createPublishHTTPClient() - newPubnub.limiter = rate.NewLimiter(20, 10) - newPubnub.ctx = context.Background() - + newPubnub.maxWorkers = 20 + newPubnub.maxQueue = 20000 + newPubnub.publishJobQueue = make(chan PublishJob, newPubnub.maxQueue) + //newPubnub.limiter = rate.NewLimiter(20, 10) + //concurrency := 5 + //newPubnub.sem = make(chan bool, 5) //make(chan bool, concurrency) + + newPubnub.newPublishQueueProcessor(newPubnub.maxWorkers) return newPubnub } @@ -1214,8 +1226,22 @@ func (pub *Pubnub) sendPublishRequest(channel, publishURLString string, publishURL = fmt.Sprintf("%s&meta=%s", publishURL, metaEncodedPath) } - value, responseCode, err := pub.publishHTTPRequest(publishURL) - pub.readPublishResponseAndCallSendResponse(channel, value, responseCode, err, callbackChannel, errorChannel) + //Add to q + //channel, publishURL, callbackChannel, errorChannel + pub.infoLogger.Printf("INFO: queuing: %s", publishURL) + + publishMessage := PublishJob{ + Channel: channel, + PublishURL: publishURL, + ErrorChannel: errorChannel, + CallbackChannel: callbackChannel, + } + pub.publishJobQueue <- publishMessage + + //pub.pqp.Run(pub, publishMessage) + + //value, responseCode, err := pub.publishHTTPRequest(publishURL) + //pub.readPublishResponseAndCallSendResponse(channel, value, responseCode, err, callbackChannel, errorChannel) } func (pub *Pubnub) readPublishResponseAndCallSendResponse(channel string, value []byte, responseCode int, err error, callbackChannel, errorChannel chan []byte) { @@ -4180,10 +4206,19 @@ func (pub *Pubnub) httpRequest(requestURL string, tType transportType) ( func (pub *Pubnub) publishHTTPRequest(requestURL string) ( []byte, int, error) { - if err := pub.limiter.Wait(pub.ctx); err != nil { + + //ctx, _ := context.WithDeadline(context.Background(), time.Duration(nonSubscribeTimeout) * time.Second) + + //ctx := context.WithCancel(parent) + /*ctx := context.Background() + if err := pub.limiter.Wait(ctx); err != nil { pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Limiter: %s", err.Error()) return nil, 0, err } + pub.limiter.SetLimitAt(now, newLimit)*/ + //pub.sem <- true + //go func(requestURL) { + //req := pub.validateRequestAndAddHeaders(requestURL) req, err := http.NewRequest("GET", requestURL, nil) if err != nil { @@ -4220,6 +4255,7 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( //defer body, err := ioutil.ReadAll(response.Body) + if err != nil { pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while parsing body: %s", err.Error()) //msg := []byte(fmt.Sprintf("Couldn't parse response body. %+v", err)) @@ -4229,7 +4265,7 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( } io.Copy(ioutil.Discard, response.Body) response.Body.Close() - + //ctx.Done() return body, response.StatusCode, nil //ph.publishSuccessChannel <- body } From 6e62b9113ed5ddf4f72fc3f59abc2a3525166c22 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Mon, 13 Mar 2017 22:49:15 +0530 Subject: [PATCH 05/21] publish queue improvements --- messaging/publish_queue_worker.go | 48 +++++++++++++++++++++---------- messaging/pubnub.go | 5 ++-- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index f0a85269..5d7a9ee6 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -34,12 +34,16 @@ func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { go func() { for { pw.Workers <- pw.JobChannel - pubnub.infoLogger.Println("INFO: StartPublishWorker: Got job") + pubnub.infoLogger.Printf("INFO: StartPublishWorker: Got job") select { case publishJob := <-pw.JobChannel: - pubnub.infoLogger.Println("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) - value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) + + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) + //go func() { + pn := pubnub + value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + //}() } } }() @@ -48,13 +52,13 @@ func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { //func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) *PublishQueueProcessor { workers := make(chan chan PublishJob, maxWorkers) - sem := make(chan bool, maxWorkers) - pubnub.infoLogger.Println("INFO: Init PublishQueueProcessor: workers %d", maxWorkers) + //sem := make(chan bool, maxWorkers) + pubnub.infoLogger.Printf("INFO: Init PublishQueueProcessor: workers %d", maxWorkers) p := &PublishQueueProcessor{ Workers: workers, maxWorkers: maxWorkers, - Sem: sem, + //Sem: sem, } p.Run(pubnub) //go p.process(pubnub) @@ -63,19 +67,19 @@ func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { //func (p *PublishQueueProcessor) Run(pubnub *Pubnub, publishJob PublishJob) { - pubnub.infoLogger.Println("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) + pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) for i := 0; i < p.maxWorkers; i++ { - pubnub.infoLogger.Println("INFO: PublishQueueProcessor: StartPublishWorker %d", i) + pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: StartPublishWorker %d", i) publishWorker := NewPublishWorker(p.Workers) publishWorker.StartPublishWorker(pubnub) } go p.process(pubnub) /*p.Sem <- true go func(publishJob PublishJob) { - pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Got job %d", publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Got job %d", publishJob.PublishURL) defer func() { <-p.Sem }() // get the url - pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) @@ -89,21 +93,35 @@ func (p *PublishQueueProcessor) process(pubnub *Pubnub) { for { select { case publishJob := <-pubnub.publishJobQueue: - pubnub.infoLogger.Println("INFO: PublishQueueProcessor process: Got job %d", publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: PublishQueueProcessor process: Got job for channel %s %s", publishJob.Channel, publishJob.PublishURL) + //p.Sem <- true go func(publishJob PublishJob) { jobChannel := <-p.Workers jobChannel <- publishJob + /*defer func() { + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) + b := <-p.Sem + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: After Defer job %d", b) + }() + + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) + go func() { + pn := pubnub + value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) + pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + }()*/ + }(publishJob) - /*pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Got job, check sem %d len:%d", publishJob.PublishURL, len(pubnub.publishJobQueue)) + /*pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Got job, check sem %d len:%d", publishJob.PublishURL, len(pubnub.publishJobQueue)) p.Sem <- true go func(publishJob PublishJob) { defer func() { - pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) b := <-p.Sem - pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: After Defer job %d", b) + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: After Defer job %d", b) }() // get the url - pubnub.infoLogger.Println("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index b96c8c80..9c230f3a 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -4244,7 +4244,7 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( SDK_VERSION) req.Header.Set("User-Agent", useragent) - + pub.infoLogger.Printf("INFO: publishHTTPRequest calling publishHTTPClient.do%s", requestURL) response, err := pub.publishHTTPClient.Do(req) if err != nil && response == nil { pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while sending request: %s", err.Error()) @@ -4255,7 +4255,7 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( //defer body, err := ioutil.ReadAll(response.Body) - + pub.infoLogger.Printf("INFO: publishHTTPRequest readall %s", requestURL) if err != nil { pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while parsing body: %s", err.Error()) //msg := []byte(fmt.Sprintf("Couldn't parse response body. %+v", err)) @@ -4264,6 +4264,7 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( return nil, response.StatusCode, err } io.Copy(ioutil.Discard, response.Body) + response.Body.Close() //ctx.Done() return body, response.StatusCode, nil From 3e18cec4cf7a473ab66c6cf6df7d502a074b5446 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Mon, 13 Mar 2017 23:27:50 +0530 Subject: [PATCH 06/21] publish queue fixes --- messaging/examples/cli/pubnubExample.go | 2 +- messaging/publish_queue_worker.go | 10 ++++++---- messaging/pubnub.go | 10 +++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/messaging/examples/cli/pubnubExample.go b/messaging/examples/cli/pubnubExample.go index 9b4caa3e..b01b5875 100644 --- a/messaging/examples/cli/pubnubExample.go +++ b/messaging/examples/cli/pubnubExample.go @@ -1477,7 +1477,7 @@ func handleResult(successChannel, errorChannel chan []byte, timeoutVal uint16, a case <-timeout: fmt.Println(fmt.Sprintf("%s Handler timeout after %d secs", action, timeoutVal)) fmt.Println("") - return + //return } } } diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index 5d7a9ee6..57c6f1ec 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -15,6 +15,7 @@ type PublishWorker struct { Workers chan chan PublishJob JobChannel chan PublishJob quit chan bool + id int } type PublishQueueProcessor struct { @@ -23,10 +24,11 @@ type PublishQueueProcessor struct { Sem chan bool } -func NewPublishWorker(workers chan chan PublishJob) PublishWorker { +func NewPublishWorker(workers chan chan PublishJob, id int) PublishWorker { return PublishWorker{ Workers: workers, JobChannel: make(chan PublishJob), + id: id, } } @@ -34,11 +36,11 @@ func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { go func() { for { pw.Workers <- pw.JobChannel - pubnub.infoLogger.Printf("INFO: StartPublishWorker: Got job") + pubnub.infoLogger.Printf("INFO: StartPublishWorker: Got job", pw.id) select { case publishJob := <-pw.JobChannel: - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %s, id:%d", publishJob.Channel, publishJob.PublishURL, pw.id) //go func() { pn := pubnub value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) @@ -70,7 +72,7 @@ func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) for i := 0; i < p.maxWorkers; i++ { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: StartPublishWorker %d", i) - publishWorker := NewPublishWorker(p.Workers) + publishWorker := NewPublishWorker(p.Workers, i) publishWorker.StartPublishWorker(pubnub) } go p.process(pubnub) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index 9c230f3a..bd6e35db 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -306,9 +306,9 @@ type Pubnub struct { retryWorker *requestWorker publishHTTPClient *http.Client maxWorkers int - maxQueue int - infoLogger *log.Logger - publishJobQueue chan PublishJob + //maxQueue int + infoLogger *log.Logger + publishJobQueue chan PublishJob //pqp *PublishQueueProcessor //limiter *rate.Limiter //sem chan bool @@ -404,8 +404,8 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK newPubnub.retryWorker = newRequestWorker("Retry", retryTransport, retryInterval, newPubnub.infoLogger) newPubnub.publishHTTPClient = createPublishHTTPClient() newPubnub.maxWorkers = 20 - newPubnub.maxQueue = 20000 - newPubnub.publishJobQueue = make(chan PublishJob, newPubnub.maxQueue) + //newPubnub.maxQueue = 20000 + newPubnub.publishJobQueue = make(chan PublishJob) //, newPubnub.maxQueue) //newPubnub.limiter = rate.NewLimiter(20, 10) //concurrency := 5 //newPubnub.sem = make(chan bool, 5) //make(chan bool, concurrency) From 07da062d0052a73ebe17c7fc8dd97a69f5874fba Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Mon, 13 Mar 2017 23:34:59 +0530 Subject: [PATCH 07/21] publish queue fixes logic 2 without workers (unclean) --- messaging/publish_queue_worker.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index 57c6f1ec..baace24a 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -53,14 +53,14 @@ func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { //func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) *PublishQueueProcessor { - workers := make(chan chan PublishJob, maxWorkers) - //sem := make(chan bool, maxWorkers) + //workers := make(chan chan PublishJob, maxWorkers) + sem := make(chan bool, maxWorkers) pubnub.infoLogger.Printf("INFO: Init PublishQueueProcessor: workers %d", maxWorkers) p := &PublishQueueProcessor{ - Workers: workers, + //Workers: workers, maxWorkers: maxWorkers, - //Sem: sem, + Sem: sem, } p.Run(pubnub) //go p.process(pubnub) @@ -70,11 +70,11 @@ func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { //func (p *PublishQueueProcessor) Run(pubnub *Pubnub, publishJob PublishJob) { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) - for i := 0; i < p.maxWorkers; i++ { + /*for i := 0; i < p.maxWorkers; i++ { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: StartPublishWorker %d", i) publishWorker := NewPublishWorker(p.Workers, i) publishWorker.StartPublishWorker(pubnub) - } + }*/ go p.process(pubnub) /*p.Sem <- true go func(publishJob PublishJob) { @@ -96,22 +96,22 @@ func (p *PublishQueueProcessor) process(pubnub *Pubnub) { select { case publishJob := <-pubnub.publishJobQueue: pubnub.infoLogger.Printf("INFO: PublishQueueProcessor process: Got job for channel %s %s", publishJob.Channel, publishJob.PublishURL) - //p.Sem <- true + p.Sem <- true go func(publishJob PublishJob) { - jobChannel := <-p.Workers - jobChannel <- publishJob - /*defer func() { + /*jobChannel := <-p.Workers + jobChannel <- publishJob*/ + defer func() { pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) b := <-p.Sem pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: After Defer job %d", b) }() pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) - go func() { - pn := pubnub - value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) - pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) - }()*/ + //go func() { + pn := pubnub + value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) + pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + //}() }(publishJob) /*pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Got job, check sem %d len:%d", publishJob.PublishURL, len(pubnub.publishJobQueue)) From 9d92ae0e9986442a538ffd6182e530384122ca31 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 10:14:53 +0530 Subject: [PATCH 08/21] publish queue fixes logic 1 with workers (unclean) --- messaging/publish_queue_worker.go | 28 ++++++++++++++++++++++++---- messaging/pubnub.go | 2 +- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index baace24a..d7d8ebd3 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -53,14 +53,24 @@ func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { //func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) *PublishQueueProcessor { + //logic 1 //workers := make(chan chan PublishJob, maxWorkers) + //end logic 1 + + //logic 2 sem := make(chan bool, maxWorkers) + //end logic 2 + pubnub.infoLogger.Printf("INFO: Init PublishQueueProcessor: workers %d", maxWorkers) p := &PublishQueueProcessor{ + //logic 1 //Workers: workers, + //end logic 1 maxWorkers: maxWorkers, - Sem: sem, + //logic 2 + Sem: sem, + //end logic 2 } p.Run(pubnub) //go p.process(pubnub) @@ -70,11 +80,13 @@ func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { //func (p *PublishQueueProcessor) Run(pubnub *Pubnub, publishJob PublishJob) { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) + //logic 1 /*for i := 0; i < p.maxWorkers; i++ { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: StartPublishWorker %d", i) publishWorker := NewPublishWorker(p.Workers, i) publishWorker.StartPublishWorker(pubnub) }*/ + //end logic 1 go p.process(pubnub) /*p.Sem <- true go func(publishJob PublishJob) { @@ -96,10 +108,17 @@ func (p *PublishQueueProcessor) process(pubnub *Pubnub) { select { case publishJob := <-pubnub.publishJobQueue: pubnub.infoLogger.Printf("INFO: PublishQueueProcessor process: Got job for channel %s %s", publishJob.Channel, publishJob.PublishURL) + //logic 2 p.Sem <- true + //end logic 2 go func(publishJob PublishJob) { - /*jobChannel := <-p.Workers - jobChannel <- publishJob*/ + //logic 1 + //jobChannel := <-p.Workers + + //jobChannel <- publishJob + //end logic 1 + + //logic 2 defer func() { pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) b := <-p.Sem @@ -111,7 +130,8 @@ func (p *PublishQueueProcessor) process(pubnub *Pubnub) { pn := pubnub value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) - //}() + //end logic 2 + //}()*/ }(publishJob) /*pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Got job, check sem %d len:%d", publishJob.PublishURL, len(pubnub.publishJobQueue)) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index bd6e35db..554cbaa2 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -237,7 +237,7 @@ var ( proxyServerEnabled = false // Used to set the value of HTTP Transport's MaxIdleConnsPerHost. - maxIdleConnsPerHost = 70 + maxIdleConnsPerHost = 30 ) // VersionInfo returns the version of the this code along with the build date. From aef2ea90b5b16322faeb546547819be19c07a0fc Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 14:22:35 +0530 Subject: [PATCH 09/21] expose max workers --- messaging/pubnub.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index 554cbaa2..7e3954ac 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -238,6 +238,9 @@ var ( // Used to set the value of HTTP Transport's MaxIdleConnsPerHost. maxIdleConnsPerHost = 30 + + //max concurrent go routines to send requests + maxWorkers = 20 ) // VersionInfo returns the version of the this code along with the build date. @@ -305,7 +308,7 @@ type Pubnub struct { nonSubscribeWorker *requestWorker retryWorker *requestWorker publishHTTPClient *http.Client - maxWorkers int + //maxWorkers int //maxQueue int infoLogger *log.Logger publishJobQueue chan PublishJob @@ -403,14 +406,14 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK nonSubscribeTimeout, newPubnub.infoLogger) newPubnub.retryWorker = newRequestWorker("Retry", retryTransport, retryInterval, newPubnub.infoLogger) newPubnub.publishHTTPClient = createPublishHTTPClient() - newPubnub.maxWorkers = 20 + //newPubnub.maxWorkers = 20 //newPubnub.maxQueue = 20000 newPubnub.publishJobQueue = make(chan PublishJob) //, newPubnub.maxQueue) //newPubnub.limiter = rate.NewLimiter(20, 10) //concurrency := 5 //newPubnub.sem = make(chan bool, 5) //make(chan bool, concurrency) - newPubnub.newPublishQueueProcessor(newPubnub.maxWorkers) + newPubnub.newPublishQueueProcessor(maxWorkers) return newPubnub } @@ -453,6 +456,11 @@ func SetMaxIdleConnsPerHost(maxIdleConnsPerHostVal int) { maxIdleConnsPerHost = maxIdleConnsPerHostVal } +// SetMaxWorkers sets the number of concurrent Go Routines to send requests. +func SetMaxWorkers(maxWorkersVal int) { + maxWorkers = maxWorkersVal +} + // SetProxy sets the global variables for the parameters. // It also sets the proxyServerEnabled value to true. // From 92b6c0738977b8bbd0b9648ca9b06c4c2e10fb55 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 14:30:56 +0530 Subject: [PATCH 10/21] cleanup --- messaging/publish_queue_worker.go | 38 ---------------------------- messaging/pubnub.go | 41 +++---------------------------- 2 files changed, 4 insertions(+), 75 deletions(-) diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index d7d8ebd3..155234d0 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -41,18 +41,15 @@ func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { case publishJob := <-pw.JobChannel: pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %s, id:%d", publishJob.Channel, publishJob.PublishURL, pw.id) - //go func() { pn := pubnub value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) - //}() } } }() } func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { - //func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) *PublishQueueProcessor { //logic 1 //workers := make(chan chan PublishJob, maxWorkers) //end logic 1 @@ -73,12 +70,9 @@ func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { //end logic 2 } p.Run(pubnub) - //go p.process(pubnub) - //return p } func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { - //func (p *PublishQueueProcessor) Run(pubnub *Pubnub, publishJob PublishJob) { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) //logic 1 /*for i := 0; i < p.maxWorkers; i++ { @@ -88,19 +82,6 @@ func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { }*/ //end logic 1 go p.process(pubnub) - /*p.Sem <- true - go func(publishJob PublishJob) { - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Got job %d", publishJob.PublishURL) - defer func() { <-p.Sem }() - // get the url - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) - value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) - pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) - - }(publishJob) - for i := 0; i < cap(p.Sem); i++ { - p.Sem <- true - }*/ } func (p *PublishQueueProcessor) process(pubnub *Pubnub) { @@ -126,31 +107,12 @@ func (p *PublishQueueProcessor) process(pubnub *Pubnub) { }() pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) - //go func() { pn := pubnub value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) //end logic 2 - //}()*/ - - }(publishJob) - /*pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Got job, check sem %d len:%d", publishJob.PublishURL, len(pubnub.publishJobQueue)) - p.Sem <- true - go func(publishJob PublishJob) { - defer func() { - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) - b := <-p.Sem - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: After Defer job %d", b) - }() - // get the url - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Running job %d", publishJob.PublishURL) - value, responseCode, err := pubnub.publishHTTPRequest(publishJob.PublishURL) - pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) }(publishJob) - /*for i := 0; i < cap(p.Sem); i++ { - p.Sem <- true - }*/ } } } diff --git a/messaging/pubnub.go b/messaging/pubnub.go index 7e3954ac..0b28c6d1 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -308,15 +308,8 @@ type Pubnub struct { nonSubscribeWorker *requestWorker retryWorker *requestWorker publishHTTPClient *http.Client - //maxWorkers int - //maxQueue int - infoLogger *log.Logger - publishJobQueue chan PublishJob - //pqp *PublishQueueProcessor - //limiter *rate.Limiter - //sem chan bool - //ctx context.Context - + infoLogger *log.Logger + publishJobQueue chan PublishJob } // PubnubUnitTest structure used to expose some data for unit tests. @@ -406,13 +399,7 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK nonSubscribeTimeout, newPubnub.infoLogger) newPubnub.retryWorker = newRequestWorker("Retry", retryTransport, retryInterval, newPubnub.infoLogger) newPubnub.publishHTTPClient = createPublishHTTPClient() - //newPubnub.maxWorkers = 20 - //newPubnub.maxQueue = 20000 - newPubnub.publishJobQueue = make(chan PublishJob) //, newPubnub.maxQueue) - //newPubnub.limiter = rate.NewLimiter(20, 10) - //concurrency := 5 - //newPubnub.sem = make(chan bool, 5) //make(chan bool, concurrency) - + newPubnub.publishJobQueue = make(chan PublishJob) newPubnub.newPublishQueueProcessor(maxWorkers) return newPubnub } @@ -4215,24 +4202,10 @@ func (pub *Pubnub) httpRequest(requestURL string, tType transportType) ( func (pub *Pubnub) publishHTTPRequest(requestURL string) ( []byte, int, error) { - //ctx, _ := context.WithDeadline(context.Background(), time.Duration(nonSubscribeTimeout) * time.Second) - - //ctx := context.WithCancel(parent) - /*ctx := context.Background() - if err := pub.limiter.Wait(ctx); err != nil { - pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Limiter: %s", err.Error()) - return nil, 0, err - } - pub.limiter.SetLimitAt(now, newLimit)*/ - //pub.sem <- true - //go func(requestURL) { - //req := pub.validateRequestAndAddHeaders(requestURL) req, err := http.NewRequest("GET", requestURL, nil) if err != nil { - //msg := []byte(fmt.Sprintf("Error Occured. %+v", err)) pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while creating request: %s", err.Error()) - //ph.publishErrorChannel <- msg return nil, 0, err } @@ -4256,8 +4229,6 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( response, err := pub.publishHTTPClient.Do(req) if err != nil && response == nil { pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while sending request: %s", err.Error()) - //msg := []byte(fmt.Sprintf("Error sending request to API endpoint. %+v", err)) - //ph.publishErrorChannel <- msg return nil, 0, err } @@ -4265,18 +4236,14 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( body, err := ioutil.ReadAll(response.Body) pub.infoLogger.Printf("INFO: publishHTTPRequest readall %s", requestURL) if err != nil { - pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while parsing body: %s", err.Error()) - //msg := []byte(fmt.Sprintf("Couldn't parse response body. %+v", err)) - //ph.publishErrorChannel <- msg + pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while parsing body: %+v", err.Error()) response.Body.Close() return nil, response.StatusCode, err } io.Copy(ioutil.Discard, response.Body) response.Body.Close() - //ctx.Done() return body, response.StatusCode, nil - //ph.publishSuccessChannel <- body } // connect creates a http request to the pubnub origin and returns the From 1de6ba7f9fbd96082b90ae9b4c2865e988d0bd0d Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 15:58:58 +0530 Subject: [PATCH 11/21] extract and reuse common code --- messaging/examples/cli/pubnubExample.go | 4 +- messaging/pubnub.go | 71 ++++++------------------- 2 files changed, 17 insertions(+), 58 deletions(-) diff --git a/messaging/examples/cli/pubnubExample.go b/messaging/examples/cli/pubnubExample.go index b01b5875..0effbea4 100644 --- a/messaging/examples/cli/pubnubExample.go +++ b/messaging/examples/cli/pubnubExample.go @@ -1459,8 +1459,8 @@ func handleResult(successChannel, errorChannel chan []byte, timeoutVal uint16, a break } if string(success) != "[]" { - //fmt.Println(fmt.Sprintf("%s Response: %s ", action, success)) - //fmt.Println("") + fmt.Println(fmt.Sprintf("%s Response: %s ", action, success)) + fmt.Println("") } return case failure, ok := <-errorChannel: diff --git a/messaging/pubnub.go b/messaging/pubnub.go index 0b28c6d1..fc854be1 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -4146,10 +4146,7 @@ func (pub *Pubnub) ParseInterfaceData(myInterface interface{}) string { func (pub *Pubnub) httpRequest(requestURL string, tType transportType) ( []byte, int, error) { - // TODO: move to pub.connect method - requrl := pub.origin + requestURL - - contents, responseStatusCode, err := pub.connect(requrl, tType, requestURL) + contents, responseStatusCode, err := pub.connect(tType, requestURL) if err != nil { if strings.Contains(err.Error(), timeout) { @@ -4171,13 +4168,13 @@ func (pub *Pubnub) httpRequest(requestURL string, tType transportType) ( return contents, responseStatusCode, err } -/*func (pub *Pubnub) validateRequestAndAddHeaders(requestURL string) *http.Request { - req, err := http.NewRequest("GET", requestURL, nil) +func (pub *Pubnub) validateRequestAndAddHeaders(requestURL string) (*http.Request, error) { + reqURL := pub.origin + requestURL + + req, err := http.NewRequest("GET", reqURL, nil) if err != nil { - //msg := []byte(fmt.Sprintf("Error Occured. %+v", err)) pub.infoLogger.Printf("ERROR: HTTP REQUEST: Error while creating request: %s", err.Error()) - //ph.publishErrorChannel <- msg - return nil, 0, err + return nil, err } scheme := "http" @@ -4191,40 +4188,21 @@ func (pub *Pubnub) httpRequest(requestURL string, tType transportType) ( Opaque: fmt.Sprintf("//%s%s", origin, requestURL), } - // REVIEW: hardcoded client version useragent := fmt.Sprintf("ua_string=(%s) PubNub-Go/%s", runtime.GOOS, SDK_VERSION) req.Header.Set("User-Agent", useragent) - return req -}*/ + return req, nil +} func (pub *Pubnub) publishHTTPRequest(requestURL string) ( []byte, int, error) { - //req := pub.validateRequestAndAddHeaders(requestURL) - req, err := http.NewRequest("GET", requestURL, nil) - if err != nil { - pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while creating request: %s", err.Error()) - return nil, 0, err - } - - scheme := "http" - if pub.isSSL { - scheme = "https" - } - - req.URL = &url.URL{ - Scheme: scheme, - Host: origin, - Opaque: fmt.Sprintf("//%s%s", origin, requestURL), + req, errReq := pub.validateRequestAndAddHeaders(requestURL) + if errReq != nil { + return nil, 0, errReq } - // REVIEW: hardcoded client version - useragent := fmt.Sprintf("ua_string=(%s) PubNub-Go/%s", runtime.GOOS, - SDK_VERSION) - - req.Header.Set("User-Agent", useragent) pub.infoLogger.Printf("INFO: publishHTTPRequest calling publishHTTPClient.do%s", requestURL) response, err := pub.publishHTTPClient.Do(req) if err != nil && response == nil { @@ -4258,33 +4236,14 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( // response errorcode if any. // error if any. // TODO: merge with httpRequest function -func (pub *Pubnub) connect(requestURL string, tType transportType, +func (pub *Pubnub) connect(tType transportType, opaqueURL string) ([]byte, int, error) { - req, err := http.NewRequest("GET", requestURL, nil) - if err != nil { - pub.infoLogger.Printf("ERROR: HTTP REQUEST: Error while creating request: %s", err.Error()) - return nil, 0, err - } - - scheme := "http" - if pub.isSSL { - scheme = "https" - } - - req.URL = &url.URL{ - Scheme: scheme, - Host: origin, - Opaque: fmt.Sprintf("//%s%s", origin, opaqueURL), + req, errReq := pub.validateRequestAndAddHeaders(opaqueURL) + if errReq != nil { + return nil, 0, errReq } - // REVIEW: hardcoded client version - useragent := fmt.Sprintf("ua_string=(%s) PubNub-Go/%s", runtime.GOOS, - SDK_VERSION) - - req.Header.Set("User-Agent", useragent) - //req := pub.validateRequestAndAddHeaders(requestURL) - switch tType { case subscribeTrans: pub.requestCloserMu.RLock() From 2a3e797aec3c6e8fa46e8324a4237c89b4c21045 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 16:37:30 +0530 Subject: [PATCH 12/21] publish queue with workers --- messaging/publish_queue_worker.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index 155234d0..e8962500 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -51,22 +51,22 @@ func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { //logic 1 - //workers := make(chan chan PublishJob, maxWorkers) + workers := make(chan chan PublishJob, maxWorkers) //end logic 1 //logic 2 - sem := make(chan bool, maxWorkers) + //sem := make(chan bool, maxWorkers) //end logic 2 pubnub.infoLogger.Printf("INFO: Init PublishQueueProcessor: workers %d", maxWorkers) p := &PublishQueueProcessor{ //logic 1 - //Workers: workers, + Workers: workers, //end logic 1 maxWorkers: maxWorkers, //logic 2 - Sem: sem, + //Sem: sem, //end logic 2 } p.Run(pubnub) @@ -75,11 +75,11 @@ func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) //logic 1 - /*for i := 0; i < p.maxWorkers; i++ { + for i := 0; i < p.maxWorkers; i++ { pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: StartPublishWorker %d", i) publishWorker := NewPublishWorker(p.Workers, i) publishWorker.StartPublishWorker(pubnub) - }*/ + } //end logic 1 go p.process(pubnub) } @@ -90,17 +90,17 @@ func (p *PublishQueueProcessor) process(pubnub *Pubnub) { case publishJob := <-pubnub.publishJobQueue: pubnub.infoLogger.Printf("INFO: PublishQueueProcessor process: Got job for channel %s %s", publishJob.Channel, publishJob.PublishURL) //logic 2 - p.Sem <- true + //p.Sem <- true //end logic 2 go func(publishJob PublishJob) { //logic 1 - //jobChannel := <-p.Workers + jobChannel := <-p.Workers - //jobChannel <- publishJob + jobChannel <- publishJob //end logic 1 //logic 2 - defer func() { + /*defer func() { pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) b := <-p.Sem pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: After Defer job %d", b) @@ -110,6 +110,7 @@ func (p *PublishQueueProcessor) process(pubnub *Pubnub) { pn := pubnub value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + */ //end logic 2 }(publishJob) From 7f28bc6f90d1dd32c151239a8cfca3a5d8dce962 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 18:49:00 +0530 Subject: [PATCH 13/21] pam with concurency and workers --- messaging/examples/cli/pubnubExample.go | 4 +- messaging/publish_queue_worker.go | 88 ++++++++++++++----------- messaging/pubnub.go | 58 +++++++++------- 3 files changed, 86 insertions(+), 64 deletions(-) diff --git a/messaging/examples/cli/pubnubExample.go b/messaging/examples/cli/pubnubExample.go index 0effbea4..35e52971 100644 --- a/messaging/examples/cli/pubnubExample.go +++ b/messaging/examples/cli/pubnubExample.go @@ -38,7 +38,7 @@ var publishKey = "demo-36" var subscribeKey = "demo-36" // -var secretKey = "demo-36" +var secretKey = "" // a boolean to capture user preference of displaying errors. var displayError = true @@ -117,7 +117,7 @@ func Init() (b bool) { fmt.Println("Please enter a secret key, leave blank for default key.") fmt.Scanln(&secretKey) if strings.TrimSpace(secretKey) == "" { - secretKey = "demo" + //secretKey = "demo" } fmt.Println("Secret Key: ", secretKey) fmt.Println("") diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index e8962500..f55dfcbf 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -1,66 +1,74 @@ package messaging -import ( -//"time" +type nonSubMsgType int + +const ( + messageTypePublish nonSubMsgType = 1 << iota + messageTypePAM ) -type PublishJob struct { +type NonSubJob struct { Channel string - PublishURL string + NonSubURL string + NonSubMsgType nonSubMsgType CallbackChannel chan []byte ErrorChannel chan []byte } -type PublishWorker struct { - Workers chan chan PublishJob - JobChannel chan PublishJob +type NonSubWorker struct { + Workers chan chan NonSubJob + JobChannel chan NonSubJob quit chan bool id int } -type PublishQueueProcessor struct { - Workers chan chan PublishJob +type NonSubQueueProcessor struct { + Workers chan chan NonSubJob maxWorkers int Sem chan bool } -func NewPublishWorker(workers chan chan PublishJob, id int) PublishWorker { - return PublishWorker{ +func NewNonSubWorker(workers chan chan NonSubJob, id int) NonSubWorker { + return NonSubWorker{ Workers: workers, - JobChannel: make(chan PublishJob), + JobChannel: make(chan NonSubJob), id: id, } } -func (pw PublishWorker) StartPublishWorker(pubnub *Pubnub) { +func (pw NonSubWorker) StartNonSubWorker(pubnub *Pubnub) { go func() { for { pw.Workers <- pw.JobChannel - pubnub.infoLogger.Printf("INFO: StartPublishWorker: Got job", pw.id) + pubnub.infoLogger.Printf("INFO: StartNonSubWorker: Worker started", pw.id) select { - case publishJob := <-pw.JobChannel: + case nonSubJob := <-pw.JobChannel: - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %s, id:%d", publishJob.Channel, publishJob.PublishURL, pw.id) + pubnub.infoLogger.Printf("INFO: StartNonSubWorker processing job FOR CHANNEL %s: Got job %s, id:%d", nonSubJob.Channel, nonSubJob.NonSubURL, pw.id) pn := pubnub - value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) - pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + value, responseCode, err := pn.nonSubHTTPRequest(nonSubJob.NonSubURL) + if nonSubJob.NonSubMsgType == messageTypePublish { + pubnub.readPublishResponseAndCallSendResponse(nonSubJob.Channel, value, responseCode, err, nonSubJob.CallbackChannel, nonSubJob.ErrorChannel) + } else if nonSubJob.NonSubMsgType == messageTypePAM { + pubnub.handlePAMResponse(nonSubJob.Channel, value, responseCode, err, nonSubJob.CallbackChannel, nonSubJob.ErrorChannel) + } } } }() } -func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { +func (pubnub *Pubnub) newNonSubQueueProcessor(maxWorkers int) *NonSubQueueProcessor { //logic 1 - workers := make(chan chan PublishJob, maxWorkers) + workers := make(chan chan NonSubJob, maxWorkers) //end logic 1 //logic 2 //sem := make(chan bool, maxWorkers) //end logic 2 - pubnub.infoLogger.Printf("INFO: Init PublishQueueProcessor: workers %d", maxWorkers) + pubnub.infoLogger.Printf("INFO: Init NonSubQueueProcessor: workers %d", maxWorkers) - p := &PublishQueueProcessor{ + p := &NonSubQueueProcessor{ //logic 1 Workers: workers, //end logic 1 @@ -69,55 +77,55 @@ func (pubnub *Pubnub) newPublishQueueProcessor(maxWorkers int) { //Sem: sem, //end logic 2 } - p.Run(pubnub) + return p } -func (p *PublishQueueProcessor) Run(pubnub *Pubnub) { - pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: Running with workers %d", p.maxWorkers) +func (p *NonSubQueueProcessor) Run(pubnub *Pubnub) { + pubnub.infoLogger.Printf("INFO: NonSubQueueProcessor: Running with workers %d", p.maxWorkers) //logic 1 for i := 0; i < p.maxWorkers; i++ { - pubnub.infoLogger.Printf("INFO: PublishQueueProcessor: StartPublishWorker %d", i) - publishWorker := NewPublishWorker(p.Workers, i) - publishWorker.StartPublishWorker(pubnub) + pubnub.infoLogger.Printf("INFO: NonSubQueueProcessor: StartNonSubWorker %d", i) + nonSubWorker := NewNonSubWorker(p.Workers, i) + nonSubWorker.StartNonSubWorker(pubnub) } //end logic 1 go p.process(pubnub) } -func (p *PublishQueueProcessor) process(pubnub *Pubnub) { +func (p *NonSubQueueProcessor) process(pubnub *Pubnub) { for { select { - case publishJob := <-pubnub.publishJobQueue: - pubnub.infoLogger.Printf("INFO: PublishQueueProcessor process: Got job for channel %s %s", publishJob.Channel, publishJob.PublishURL) + case nonSubJob := <-pubnub.nonSubJobQueue: + pubnub.infoLogger.Printf("INFO: NonSubQueueProcessor process: Got job for channel %s %s", nonSubJob.Channel, nonSubJob.NonSubURL) //logic 2 //p.Sem <- true //end logic 2 - go func(publishJob PublishJob) { + go func(nonSubJob NonSubJob) { //logic 1 jobChannel := <-p.Workers - jobChannel <- publishJob + jobChannel <- nonSubJob //end logic 1 //logic 2 /*defer func() { - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: Defer job %d", publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: StartNonSubWorker processing job: Defer job %d", nonSubJob.NonSubURL) b := <-p.Sem - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job: After Defer job %d", b) + pubnub.infoLogger.Printf("INFO: StartNonSubWorker processing job: After Defer job %d", b) }() - pubnub.infoLogger.Printf("INFO: StartPublishWorker processing job FOR CHANNEL %s: Got job %d", publishJob.Channel, publishJob.PublishURL) + pubnub.infoLogger.Printf("INFO: StartNonSubWorker processing job FOR CHANNEL %s: Got job %d", nonSubJob.Channel, nonSubJob.NonSubURL) pn := pubnub - value, responseCode, err := pn.publishHTTPRequest(publishJob.PublishURL) - pubnub.readPublishResponseAndCallSendResponse(publishJob.Channel, value, responseCode, err, publishJob.CallbackChannel, publishJob.ErrorChannel) + value, responseCode, err := pn.nonSubHTTPRequest(nonSubJob.NonSubURL) + pubnub.readPublishResponseAndCallSendResponse(nonSubJob.Channel, value, responseCode, err, nonSubJob.CallbackChannel, nonSubJob.ErrorChannel) */ //end logic 2 - }(publishJob) + }(nonSubJob) } } } -func (p *PublishQueueProcessor) Close(pubnub *Pubnub) { +func (p *NonSubQueueProcessor) Close() { close(p.Workers) } diff --git a/messaging/pubnub.go b/messaging/pubnub.go index fc854be1..0be27c3d 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -307,9 +307,10 @@ type Pubnub struct { presenceHeartbeatWorker *requestWorker nonSubscribeWorker *requestWorker retryWorker *requestWorker - publishHTTPClient *http.Client + nonSubHTTPClient *http.Client infoLogger *log.Logger - publishJobQueue chan PublishJob + nonSubJobQueue chan NonSubJob + nonSubQueueProcessor *NonSubQueueProcessor } // PubnubUnitTest structure used to expose some data for unit tests. @@ -398,13 +399,14 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK newPubnub.nonSubscribeWorker = newRequestWorker("Non-Subscribe", nonSubscribeTransport, nonSubscribeTimeout, newPubnub.infoLogger) newPubnub.retryWorker = newRequestWorker("Retry", retryTransport, retryInterval, newPubnub.infoLogger) - newPubnub.publishHTTPClient = createPublishHTTPClient() - newPubnub.publishJobQueue = make(chan PublishJob) - newPubnub.newPublishQueueProcessor(maxWorkers) + newPubnub.nonSubHTTPClient = createNonSubHTTPClient() + newPubnub.nonSubJobQueue = make(chan NonSubJob) + newPubnub.nonSubQueueProcessor = newPubnub.newNonSubQueueProcessor(maxWorkers) + newPubnub.nonSubQueueProcessor.Run(newPubnub) return newPubnub } -func createPublishHTTPClient() *http.Client { +func createNonSubHTTPClient() *http.Client { client := &http.Client{ Transport: &http.Transport{ MaxIdleConnsPerHost: maxIdleConnsPerHost, @@ -703,6 +705,7 @@ func (pub *Pubnub) Abort() { pub.nonSubscribeWorker.Cancel() pub.cancelPresenceHeartbeatWorker() pub.retryWorker.Cancel() + pub.nonSubQueueProcessor.Close() } // GrantSubscribe is used to give a subscribe channel read, write permissions @@ -1074,9 +1077,25 @@ func (pub *Pubnub) executePam(entity, requestURL string, } else { pub.sendErrorResponse(errorChannel, entity, message) } + return } - value, responseCode, err := pub.httpRequest(requestURL, nonSubscribeTrans) + pub.infoLogger.Printf("INFO: queuing: %s", requestURL) + + pamMessage := NonSubJob{ + Channel: entity, + NonSubURL: requestURL, + ErrorChannel: errorChannel, + CallbackChannel: callbackChannel, + NonSubMsgType: messageTypePAM, + } + pub.nonSubJobQueue <- pamMessage + + //value, responseCode, err := pub.httpRequest(requestURL, nonSubscribeTrans) + //pub.handlePAMResponse(entity, value, responseCode, err, callbackChannel, errorChannel) +} + +func (pub *Pubnub) handlePAMResponse(entity string, value []byte, responseCode int, err error, callbackChannel, errorChannel chan []byte) { if (responseCode != 200) || (err != nil) { var message = "" @@ -1221,22 +1240,17 @@ func (pub *Pubnub) sendPublishRequest(channel, publishURLString string, publishURL = fmt.Sprintf("%s&meta=%s", publishURL, metaEncodedPath) } - //Add to q - //channel, publishURL, callbackChannel, errorChannel pub.infoLogger.Printf("INFO: queuing: %s", publishURL) - publishMessage := PublishJob{ + publishMessage := NonSubJob{ Channel: channel, - PublishURL: publishURL, + NonSubURL: publishURL, ErrorChannel: errorChannel, CallbackChannel: callbackChannel, + NonSubMsgType: messageTypePublish, } - pub.publishJobQueue <- publishMessage - - //pub.pqp.Run(pub, publishMessage) + pub.nonSubJobQueue <- publishMessage - //value, responseCode, err := pub.publishHTTPRequest(publishURL) - //pub.readPublishResponseAndCallSendResponse(channel, value, responseCode, err, callbackChannel, errorChannel) } func (pub *Pubnub) readPublishResponseAndCallSendResponse(channel string, value []byte, responseCode int, err error, callbackChannel, errorChannel chan []byte) { @@ -4195,7 +4209,7 @@ func (pub *Pubnub) validateRequestAndAddHeaders(requestURL string) (*http.Reques return req, nil } -func (pub *Pubnub) publishHTTPRequest(requestURL string) ( +func (pub *Pubnub) nonSubHTTPRequest(requestURL string) ( []byte, int, error) { req, errReq := pub.validateRequestAndAddHeaders(requestURL) @@ -4203,18 +4217,18 @@ func (pub *Pubnub) publishHTTPRequest(requestURL string) ( return nil, 0, errReq } - pub.infoLogger.Printf("INFO: publishHTTPRequest calling publishHTTPClient.do%s", requestURL) - response, err := pub.publishHTTPClient.Do(req) + pub.infoLogger.Printf("INFO: nonSubHTTPRequest calling nonSubHTTPClient.do%s", requestURL) + response, err := pub.nonSubHTTPClient.Do(req) if err != nil && response == nil { - pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while sending request: %s", err.Error()) + pub.infoLogger.Printf("ERROR: NonSub HTTP REQUEST: Error while sending request: %s", err.Error()) return nil, 0, err } //defer body, err := ioutil.ReadAll(response.Body) - pub.infoLogger.Printf("INFO: publishHTTPRequest readall %s", requestURL) + pub.infoLogger.Printf("INFO: nonSubHTTPRequest readall %s", requestURL) if err != nil { - pub.infoLogger.Printf("ERROR: Publish HTTP REQUEST: Error while parsing body: %+v", err.Error()) + pub.infoLogger.Printf("ERROR: NonSub HTTP REQUEST: Error while parsing body: %+v", err.Error()) response.Body.Close() return nil, response.StatusCode, err } From 2de4a0e8080c1152784df2f11ca00989eb749975 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 19:33:56 +0530 Subject: [PATCH 14/21] proxy implementation for workers --- messaging/publish_queue_worker.go | 1 + messaging/pubnub.go | 36 +++++++++++++------------------ 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/messaging/publish_queue_worker.go b/messaging/publish_queue_worker.go index f55dfcbf..4412dbc2 100644 --- a/messaging/publish_queue_worker.go +++ b/messaging/publish_queue_worker.go @@ -77,6 +77,7 @@ func (pubnub *Pubnub) newNonSubQueueProcessor(maxWorkers int) *NonSubQueueProces //Sem: sem, //end logic 2 } + p.Run(pubnub) return p } diff --git a/messaging/pubnub.go b/messaging/pubnub.go index 0be27c3d..d9f8838c 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -399,28 +399,22 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK newPubnub.nonSubscribeWorker = newRequestWorker("Non-Subscribe", nonSubscribeTransport, nonSubscribeTimeout, newPubnub.infoLogger) newPubnub.retryWorker = newRequestWorker("Retry", retryTransport, retryInterval, newPubnub.infoLogger) - newPubnub.nonSubHTTPClient = createNonSubHTTPClient() + newPubnub.nonSubHTTPClient = newPubnub.createNonSubHTTPClient() newPubnub.nonSubJobQueue = make(chan NonSubJob) newPubnub.nonSubQueueProcessor = newPubnub.newNonSubQueueProcessor(maxWorkers) - newPubnub.nonSubQueueProcessor.Run(newPubnub) + return newPubnub } -func createNonSubHTTPClient() *http.Client { - client := &http.Client{ - Transport: &http.Transport{ - MaxIdleConnsPerHost: maxIdleConnsPerHost, - Dial: (&net.Dialer{ - Timeout: time.Duration(connectTimeout) * time.Second, - KeepAlive: 30 * time.Minute, - }).Dial, - }, - - Timeout: time.Duration(nonSubscribeTimeout) * time.Second, +func (pub *Pubnub) createNonSubHTTPClient() *http.Client { + transport := &http.Transport{ + MaxIdleConnsPerHost: maxIdleConnsPerHost, + Dial: (&net.Dialer{ + Timeout: time.Duration(connectTimeout) * time.Second, + KeepAlive: 30 * time.Minute, + }).Dial, + ResponseHeaderTimeout: time.Duration(nonSubscribeTimeout) * time.Second, } - - /*transport.ResponseHeaderTimeout = time.Duration(w.Timeout) * time.Second - if proxyServerEnabled { proxyURL, err := url.Parse(fmt.Sprintf("http://%s:%s@%s:%d", proxyUser, proxyPassword, proxyServer, proxyPort)) @@ -428,13 +422,13 @@ func createNonSubHTTPClient() *http.Client { if err == nil { transport.Proxy = http.ProxyURL(proxyURL) } else { - w.InfoLogger.Printf("ERROR: %s: Proxy connection error: %s", w.Name, err.Error()) + pub.infoLogger.Printf("ERROR: createNonSubHTTPClient: Proxy connection error: %s", err.Error()) } } - - transport.MaxIdleConnsPerHost = maxIdleConnsPerHost - w.Transport = transport*/ - + client := &http.Client{ + Transport: transport, + Timeout: time.Duration(nonSubscribeTimeout) * time.Second, + } return client } From 8d810cca3cffea9053aca2963b6322aef641eb3e Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 19:36:44 +0530 Subject: [PATCH 15/21] proxy implementation for workers --- messaging/pubnub.go | 1 + 1 file changed, 1 insertion(+) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index d9f8838c..aba5a615 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -407,6 +407,7 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK } func (pub *Pubnub) createNonSubHTTPClient() *http.Client { + //TODO: Create a common implemetation to create transport for createNonSubHTTPClient and (w *requestWorker) Client() transport := &http.Transport{ MaxIdleConnsPerHost: maxIdleConnsPerHost, Dial: (&net.Dialer{ From deb7b20c78ee66044171fd7a16e74f5124117695 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 20:11:56 +0530 Subject: [PATCH 16/21] Build constratint to accomadate go version < 1.3 --- messaging/pubnub.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/messaging/pubnub.go b/messaging/pubnub.go index aba5a615..7acd29b5 100644 --- a/messaging/pubnub.go +++ b/messaging/pubnub.go @@ -21,7 +21,7 @@ import ( "io" "io/ioutil" "log" - "net" + //"net" "net/http" "net/url" "reflect" @@ -406,7 +406,7 @@ func NewPubnub(publishKey string, subscribeKey string, secretKey string, cipherK return newPubnub } -func (pub *Pubnub) createNonSubHTTPClient() *http.Client { +/*func (pub *Pubnub) createNonSubHTTPClient() *http.Client { //TODO: Create a common implemetation to create transport for createNonSubHTTPClient and (w *requestWorker) Client() transport := &http.Transport{ MaxIdleConnsPerHost: maxIdleConnsPerHost, @@ -431,7 +431,7 @@ func (pub *Pubnub) createNonSubHTTPClient() *http.Client { Timeout: time.Duration(nonSubscribeTimeout) * time.Second, } return client -} +}*/ // SetMaxIdleConnsPerHost is used to set the value of HTTP Transport's MaxIdleConnsPerHost. // It restricts how many connections there are which are not actively serving requests, but which the client has not closed. From 6c50d6126b09c3fa0cf2c8f12fd6f43e6db60d6f Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 20:25:32 +0530 Subject: [PATCH 17/21] Build constratint to accomadate go version < 1.3 fixes --- messaging/httpClientAbove1Dot3.go | 38 +++++++++++++++++++++++++++++++ messaging/httpClientBelow1Dot3.go | 38 +++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 messaging/httpClientAbove1Dot3.go create mode 100644 messaging/httpClientBelow1Dot3.go diff --git a/messaging/httpClientAbove1Dot3.go b/messaging/httpClientAbove1Dot3.go new file mode 100644 index 00000000..4f1431dd --- /dev/null +++ b/messaging/httpClientAbove1Dot3.go @@ -0,0 +1,38 @@ +// +build go1.3 + +package messaging + +import ( + "fmt" + "net" + "net/http" + "net/url" + "time" +) + +func (pub *Pubnub) createNonSubHTTPClient() *http.Client { + //TODO: Create a common implemetation to create transport for createNonSubHTTPClient and (w *requestWorker) Client() + transport := &http.Transport{ + MaxIdleConnsPerHost: maxIdleConnsPerHost, + Dial: (&net.Dialer{ + Timeout: time.Duration(connectTimeout) * time.Second, + KeepAlive: 30 * time.Minute, + }).Dial, + ResponseHeaderTimeout: time.Duration(nonSubscribeTimeout) * time.Second, + } + if proxyServerEnabled { + proxyURL, err := url.Parse(fmt.Sprintf("http://%s:%s@%s:%d", proxyUser, + proxyPassword, proxyServer, proxyPort)) + + if err == nil { + transport.Proxy = http.ProxyURL(proxyURL) + } else { + pub.infoLogger.Printf("ERROR: createNonSubHTTPClient: Proxy connection error: %s", err.Error()) + } + } + client := &http.Client{ + Transport: transport, + Timeout: time.Duration(nonSubscribeTimeout) * time.Second, + } + return client +} diff --git a/messaging/httpClientBelow1Dot3.go b/messaging/httpClientBelow1Dot3.go new file mode 100644 index 00000000..5f49b5a6 --- /dev/null +++ b/messaging/httpClientBelow1Dot3.go @@ -0,0 +1,38 @@ +// +build !go1.3 + +package messaging + +import ( + "fmt" + "net" + "net/http" + "net/url" + "time" +) + +func (pub *Pubnub) createNonSubHTTPClient() *http.Client { + //TODO: Create a common implemetation to create transport for createNonSubHTTPClient and (w *requestWorker) Client() + transport := &http.Transport{ + MaxIdleConnsPerHost: maxIdleConnsPerHost, + Dial: (&net.Dialer{ + Timeout: time.Duration(connectTimeout) * time.Second, + //KeepAlive: 30 * time.Minute, + }).Dial, + ResponseHeaderTimeout: time.Duration(nonSubscribeTimeout) * time.Second, + } + if proxyServerEnabled { + proxyURL, err := url.Parse(fmt.Sprintf("http://%s:%s@%s:%d", proxyUser, + proxyPassword, proxyServer, proxyPort)) + + if err == nil { + transport.Proxy = http.ProxyURL(proxyURL) + } else { + pub.infoLogger.Printf("ERROR: createNonSubHTTPClient: Proxy connection error: %s", err.Error()) + } + } + client := &http.Client{ + Transport: transport, + //Timeout: time.Duration(nonSubscribeTimeout) * time.Second, + } + return client +} From 0dc2d8a3edc02404ac1a0b6e0d68f81b7c80a006 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 20:42:39 +0530 Subject: [PATCH 18/21] Updated example --- messaging/examples/cli/pubnubExample.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/messaging/examples/cli/pubnubExample.go b/messaging/examples/cli/pubnubExample.go index 35e52971..2c47a234 100644 --- a/messaging/examples/cli/pubnubExample.go +++ b/messaging/examples/cli/pubnubExample.go @@ -32,10 +32,10 @@ var cipher = "" var uuid = "" // -var publishKey = "demo-36" +var publishKey = "demo" // -var subscribeKey = "demo-36" +var subscribeKey = "demo" // var secretKey = "" @@ -70,7 +70,6 @@ func main() { func Init() (b bool) { fmt.Println("") fmt.Println(messaging.VersionInfo()) - messaging.SetMaxIdleConnsPerHost(20) fmt.Println("") fmt.Println("Please enter the channel name(s). Enter multiple channels separated by comma without spaces.") reader := bufio.NewReader(os.Stdin) @@ -185,8 +184,8 @@ func Init() (b bool) { fmt.Println("Logging disabled") } - messaging.SetOrigin("balancer-tj71.devbuild.aws-pdx-1.ps.pn") - //messaging.SetOrigin("ps.pndsn.com") + //messaging.SetOrigin("balancer-tj71.devbuild.aws-pdx-1.ps.pn") + messaging.SetOrigin("ps.pndsn.com") var pubInstance = messaging.NewPubnub(publishKey, subscribeKey, secretKey, cipher, ssl, uuid, infoLogger) From 7e1574c83838f3bfba7e83b42144dee96bdfbd37 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 20:53:07 +0530 Subject: [PATCH 19/21] Bump version and add supported platforms --- .pubnub.yml | 19 +++++++++++++++++-- messaging/README.md | 4 +++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.pubnub.yml b/.pubnub.yml index fbd58568..e14a5cdc 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,6 +1,13 @@ --- changelog: - - + - + changes: + - + text: “NonSub goroutine concurrency and worker queues” + type: improvement + date: Mar 10, 17 + version: v3.11.0 + - changes: - text: “Breaking API Change newPubnub has a new parameter where it expects a logger instance. This fixes a rare race condition” @@ -12,7 +19,7 @@ changelog: text: “Fix use of escaping JSON during publish” type: improvement date: Feb 22, 17 - version: v3.10.0 + version: v3.10.0 - changes: - @@ -229,6 +236,14 @@ features: - SUBSCRIBE-PUBLISHER-UUID time: - TIME-TIME +supported-platforms: + - + version: PubNub Go SDK 3.11.0 + platforms: + - FreeBSD 8-STABLE or later, amd64, 386, Debian GNU/kFreeBSD not supported. + - Linux 2.6.23 or later with glibc, amd64, 386, arm, s390x, ppc64le, CentOS/RHEL 5.x not supported. + - Mac OS X 10.8 or later, amd64, use the clang or gcc† that comes with Xcode‡ for cgo support. + - Windows 7 or later, amd64, 386, use MinGW gcc†. No need for cygwin or msys. name: go schema: 1 scm: github.com/pubnub/go diff --git a/messaging/README.md b/messaging/README.md index a7a85ed1..45b1c99d 100644 --- a/messaging/README.md +++ b/messaging/README.md @@ -7,7 +7,9 @@ * Subscribe method arguments changed ###Change log -* 3.11.0 +* 3.1q.0 + * NonSub goroutine concurrency and worker queues. +* 3.10.0 * Breaking API Change: newPubnub has a new parameter where it expects a logger instance [Example](#init). This fixes a rare race condition. * Fix use of escaping JSON during publish * Prefix uuid with 'pn-' From b1c8d59d1f7266bfd3ccc7e24dfb47f397831a10 Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 21:18:09 +0530 Subject: [PATCH 20/21] Add supports go versions --- .pubnub.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.pubnub.yml b/.pubnub.yml index e14a5cdc..62a389b1 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -244,6 +244,14 @@ supported-platforms: - Linux 2.6.23 or later with glibc, amd64, 386, arm, s390x, ppc64le, CentOS/RHEL 5.x not supported. - Mac OS X 10.8 or later, amd64, use the clang or gcc† that comes with Xcode‡ for cgo support. - Windows 7 or later, amd64, 386, use MinGW gcc†. No need for cygwin or msys. + editor: + - go1.2 + - go1.3 + - go1.4 + - go1.5 + - go1.6 + - go1.7 + - go1.8 name: go schema: 1 scm: github.com/pubnub/go From 0a1b6e9985366a9911f1821f2f21cd29c633507f Mon Sep 17 00:00:00 2001 From: Rajat Kalsy Date: Tue, 14 Mar 2017 21:28:08 +0530 Subject: [PATCH 21/21] Update .pubnub.yml --- .pubnub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pubnub.yml b/.pubnub.yml index 62a389b1..7f743427 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -244,7 +244,7 @@ supported-platforms: - Linux 2.6.23 or later with glibc, amd64, 386, arm, s390x, ppc64le, CentOS/RHEL 5.x not supported. - Mac OS X 10.8 or later, amd64, use the clang or gcc† that comes with Xcode‡ for cgo support. - Windows 7 or later, amd64, 386, use MinGW gcc†. No need for cygwin or msys. - editor: + editors: - go1.2 - go1.3 - go1.4