Antidote-for-Tox / objcTox

No longer maintained
Mozilla Public License 2.0
38 stars 12 forks source link

Chuongv/audio tests and demo #52

Closed Chuongv closed 9 years ago

Chuongv commented 9 years ago

Demo has been implemented. Feel free to test it out :smile:

Thanks

dvor commented 9 years ago

This test is failing sometimes. Maybe there is something race condition and toxAV is getting freed too early. Could you check that please? If nothing comes to your head you can simply add logging in test, so next time we would see what's happening there.

Failures:
  0) -[OCTToxAVTests testVersionMethods] (objcToxTests.xctest)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/Users/travis/build/Antidote-for-Tox/objcTox/objcToxTests/OCTToxAVTests.m:478: ((toxAV.toxAV == cToxAV) is true) failed:
475 {
476     OCTToxAV *toxAV = [(__bridge OCTToxAVTests *)refToSelf toxAV];
477 
478     CCCAssertTrue(toxAV.toxAV == cToxAV);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
479 }
480 
Chuongv commented 9 years ago

Looking into it.. I believe it's from the testStartAndStopMethod. When you dispatch_source_cancel, it does not interrupt any leftover tox_iterate in the queue.

Cancellation prevents any further invocation of the event handler block for the specified dispatch source, but does not interrupt an event handler block that is already in progress

toxav goes to nil in the dealloc and then tox_iterate runs. Not sure what the best way to work around this is? We can add a cancel completion block to the dispatch_source?

Chuongv commented 9 years ago

Okay, I think I solved it now. Was much simpler than I originally thought. Or at least I hope. :smile:

dvor commented 9 years ago

pod install failed for some reason, I've restarted travis.

dvor commented 9 years ago

Hm, it seems that mannol has deleted his user from github :open_mouth:

Chuongv commented 9 years ago

Hmm that's not good.... hopefully there's some explanation for this. Right now no one on IRC knows..

Chuongv commented 9 years ago

Okay finally got it to pass again :sweat_smile: Mannol added the old group audio chats but it was causing problems with the build, so I had to revert it back for now.

Chuongv commented 9 years ago

Updated, I'm not satisfied with how I did the enums, so feel free to give me any better suggestions

Chuongv commented 9 years ago

Thanks for the comments, just updated

dvor commented 9 years ago

With your branches in Antidote-for-Tox project I can see all updates in my feed. So no need to comment after updating now. :-)