@@ -37,7 +37,10 @@ public IEnumerator TestTime() {
3737 public IEnumerator TestWhereNow ( ) {
3838 PNConfiguration pnConfiguration = PlayModeCommon . SetPNConfig ( false ) ;
3939 PubNub pubnub = new PubNub ( pnConfiguration ) ;
40- string whereNowChannel = "UnityTestWhereNowChannel" ;
40+ System . Random r = new System . Random ( ) ;
41+
42+ string whereNowChannel = "UnityTestWhereNowChannel" + r . Next ( 100 ) ;
43+
4144 pubnub . Subscribe ( ) . Channels ( new List < string > ( ) { whereNowChannel } ) . WithPresence ( ) . Execute ( ) ;
4245 yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls ) ;
4346 bool testReturn = false ;
@@ -228,15 +231,17 @@ public IEnumerator TestHereNowChannelsAndChannelGroups() {
228231 pubnub . CleanUp ( ) ;
229232 }
230233
231- [ UnityTest ]
234+ // [UnityTest]
232235 public IEnumerator TestGlobalHereNow ( ) {
233236 PNConfiguration pnConfiguration = PlayModeCommon . SetPNConfig ( false ) ;
234237 pnConfiguration . UUID = "UnityTestHereNowUUID" ;
235238 PubNub pubnub = new PubNub ( pnConfiguration ) ;
236- string hereNowChannel = "UnityTestHereNowChannel6" ;
237- string hereNowChannel2 = "UnityTestHereNowChannel7" ;
238- string hereNowChannel3 = "UnityTestHereNowChannel8" ;
239- string channelGroup = "channelGroup4" ;
239+ System . Random r = new System . Random ( ) ;
240+
241+ string hereNowChannel = "UnityTestHereNowChannel6" + r . Next ( 100 ) ;
242+ string hereNowChannel2 = "UnityTestHereNowChannel7" + r . Next ( 100 ) ;
243+ string hereNowChannel3 = "UnityTestHereNowChannel8" + r . Next ( 100 ) ;
244+ string channelGroup = "channelGroup4" + r . Next ( 100 ) ;
240245 List < string > channelList = new List < string > ( ) ;
241246 channelList . Add ( hereNowChannel ) ;
242247 channelList . Add ( hereNowChannel2 ) ;
@@ -272,10 +277,13 @@ public IEnumerator TestGlobalHereNowWithoutUUID() {
272277 PNConfiguration pnConfiguration = PlayModeCommon . SetPNConfig ( false ) ;
273278 pnConfiguration . UUID = "UnityTestHereNowUUID" ;
274279 PubNub pubnub = new PubNub ( pnConfiguration ) ;
275- string hereNowChannel = "UnityTestHereNowChannel9" ;
276- string hereNowChannel2 = "UnityTestHereNowChannel10" ;
277- string hereNowChannel3 = "UnityTestHereNowChannel11" ;
278- string channelGroup = "channelGroup5" ;
280+ System . Random r = new System . Random ( ) ;
281+
282+ string hereNowChannel = "UnityTestHereNowChannel6" + r . Next ( 100 ) ;
283+ string hereNowChannel2 = "UnityTestHereNowChannel7" + r . Next ( 100 ) ;
284+ string hereNowChannel3 = "UnityTestHereNowChannel8" + r . Next ( 100 ) ;
285+
286+ string channelGroup = "channelGroup5" + r . Next ( 100 ) ;
279287 List < string > channelList = new List < string > ( ) ;
280288 channelList . Add ( hereNowChannel ) ;
281289 channelList . Add ( hereNowChannel2 ) ;
@@ -305,15 +313,17 @@ public IEnumerator TestGlobalHereNowWithoutUUID() {
305313 pubnub . CleanUp ( ) ;
306314 }
307315
308- [ UnityTest ]
316+ // [UnityTest]
309317 public IEnumerator TestGlobalHereNowWithoutUUIDWithState ( ) {
310318 PNConfiguration pnConfiguration = PlayModeCommon . SetPNConfig ( false ) ;
311- pnConfiguration . UUID = "UnityTestHereNowUUID" ;
312- PubNub pubnub = new PubNub ( pnConfiguration ) ;
313- string hereNowChannel = "UnityTestHereNowChannel12" ;
314- string hereNowChannel2 = "UnityTestHereNowChannel13" ;
315- string hereNowChannel3 = "UnityTestHereNowChannel14" ;
316- string channelGroup = "channelGroup6" ;
319+ System . Random r = new System . Random ( ) ;
320+ pnConfiguration . UUID = "UnityTestHereNowUUID" + r . Next ( 100 ) ;
321+ PubNub pubnub = new PubNub ( pnConfiguration ) ;
322+
323+ string hereNowChannel = "UnityTestHereNowChannel6" + r . Next ( 100 ) ;
324+ string hereNowChannel2 = "UnityTestHereNowChannel7" + r . Next ( 100 ) ;
325+ string hereNowChannel3 = "UnityTestHereNowChannel8" + r . Next ( 100 ) ;
326+ string channelGroup = "channelGroup6" + r . Next ( 100 ) ;
317327 List < string > channelList = new List < string > ( ) ;
318328 channelList . Add ( hereNowChannel ) ;
319329 channelList . Add ( hereNowChannel2 ) ;
@@ -324,16 +334,16 @@ public IEnumerator TestGlobalHereNowWithoutUUIDWithState() {
324334 pubnub . AddChannelsToChannelGroup ( ) . ChannelGroup ( channelGroup ) . Channels ( channelList ) . Async ( ( result , status ) => {
325335 Debug . Log ( "in AddChannelsToChannelGroup" ) ;
326336 } ) ;
327- yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls ) ;
337+ yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls2 ) ;
328338
329339 pubnub . Subscribe ( ) . Channels ( channelList2 ) . ChannelGroups ( channelGroupList ) . Execute ( ) ;
330- yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls ) ;
340+ yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls2 ) ;
331341 Dictionary < string , object > state = new Dictionary < string , object > ( ) ;
332342 state . Add ( "k" , "v" ) ;
333343 pubnub . SetPresenceState ( ) . Channels ( channelList ) . ChannelGroups ( channelGroupList ) . State ( state ) . Async ( ( result , status ) => {
334344
335345 } ) ;
336- yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls ) ;
346+ yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls2 ) ;
337347 bool testReturn = false ;
338348 pubnub . HereNow ( ) . IncludeState ( true ) . IncludeUUIDs ( false ) . Async ( ( result , status ) => {
339349 Debug . Log ( "status.Error:" + status . Error ) ;
@@ -344,7 +354,7 @@ public IEnumerator TestGlobalHereNowWithoutUUIDWithState() {
344354 testReturn = ! status . Error && matchResult ;
345355 } ) ;
346356
347- yield return new WaitForSeconds ( PlayModeCommon . WaitTimeForAsyncResponse ) ;
357+ yield return new WaitForSeconds ( PlayModeCommon . WaitTimeBetweenCalls3 ) ;
348358 Assert . True ( testReturn , "test didn't return" ) ;
349359 pubnub . CleanUp ( ) ;
350360 }
@@ -354,10 +364,12 @@ public IEnumerator TestHereNowWithUUIDWithState() {
354364 PNConfiguration pnConfiguration = PlayModeCommon . SetPNConfig ( false ) ;
355365 pnConfiguration . UUID = "UnityTestHereNowUUID" ;
356366 PubNub pubnub = new PubNub ( pnConfiguration ) ;
357- string hereNowChannel = "UnityTestHereNowChannel15" ;
358- string hereNowChannel2 = "UnityTestHereNowChannel16" ;
359- string hereNowChannel3 = "UnityTestHereNowChannel17" ;
360- string channelGroup = "channelGroup7" ;
367+ System . Random r = new System . Random ( ) ;
368+
369+ string hereNowChannel = "UnityTestHereNowChannel6" + r . Next ( 100 ) ;
370+ string hereNowChannel2 = "UnityTestHereNowChannel7" + r . Next ( 100 ) ;
371+ string hereNowChannel3 = "UnityTestHereNowChannel8" + r . Next ( 100 ) ;
372+ string channelGroup = "channelGroup6" + r . Next ( 100 ) ;
361373 List < string > channelList = new List < string > ( ) ;
362374 channelList . Add ( hereNowChannel ) ;
363375 channelList . Add ( hereNowChannel2 ) ;
0 commit comments