parse-community / Parse-SDK-iOS-OSX

The Apple SDK for Parse Platform (iOS, macOS, watchOS, tvOS)
https://parseplatform.org
Other
2.81k stars 864 forks source link

MacOS unit test on Xcode crashes #1680

Closed ninjadev106 closed 1 year ago

ninjadev106 commented 1 year ago

New Issue Checklist

Issue Description

Running macOS test using the Xcode test navigator crashes and the reason is "Thread11: "The class PFPin must be registered with registerSubclass before using Parse.""

Steps to reproduce

  1. Click on Test Navigator on the top of Navigator area of Xcode
  2. Hold the pointer over the ParseUnitTests-macOS bundle and click the Run button that appears on the right.
  3. When the Test case "[QueryUnitTests testCLearAllCachedResults]" starts, it crashes in dipatch_sync(queue, block) of the PFThreadsafetySafeDispatchSync method on the PFThreadsafety.m file

Actual Outcome

Test fails.

Expected Outcome

Test passes.

Environment

Client

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!

mtrezza commented 1 year ago

Is this a duplicate of https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1677? Which test exactly fails?

ninjadev106 commented 1 year ago

When the Test case "[QueryUnitTests testCLearAllCachedResults]" starts, it crashes in dipatch_sync(queue, block) of the PFThreadsafetySafeDispatchSync method on the PFThreadsafety.m file Screenshot_1

ninjadev106 commented 1 year ago

Is this a duplicate of #1677? Which test exactly fails?

I think it's not a duplicate of #1677

mtrezza commented 1 year ago

What is the name of the test that you start? Or does this happen with every test

ninjadev106 commented 1 year ago

QueryUnitTests Yes, that happens with almost every test except for another crash which sometimes happens too. The another crash reason is "Thread 8: "Invalid class name. Class names cannot start with an underscore""

image

ninjadev106 commented 1 year ago

The interesting point is that it doesn't happen when running all tests in the single QueryUnitTests class. It happens only when running all tests in the project bundle(ParseUnitTests-macOS)

mtrezza commented 1 year ago

The failing test in https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/1681 is the same one described in https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1677. So is this issue a duplicate of #1677?

ninjadev106 commented 1 year ago

Yes, this seems to be a duplicate of #1677

mtrezza commented 1 year ago

OK, I'll close this as duplicate and assign the PR to the former issue.

mtrezza commented 1 year ago

Closing as duplicate of https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1677