Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Assets/Tests/PlayMode/Services/FriendsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public IEnumerator QueryFriendsList()
QueryFriendsCallbackInfo? result = null;
_friendsInterface.QueryFriends(ref options, null, (ref QueryFriendsCallbackInfo data) => { result = data; });

yield return new WaitUntil(() => result != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => result != null);
if (result != null)
{
Assert.AreEqual(Result.Success, result.Value.ResultCode, "Could not query the friends list.");
Expand Down Expand Up @@ -103,7 +103,7 @@ public IEnumerator SearchFriendsListByDisplayName()
QueryUserInfoByDisplayNameCallbackInfo? queryResult = null;
_userInfoInterface.QueryUserInfoByDisplayName(ref options, null, (ref QueryUserInfoByDisplayNameCallbackInfo data) => { queryResult = data; });

yield return new WaitUntil(() => queryResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => queryResult != null);
Assert.AreEqual(Result.NotFound, queryResult.Value.ResultCode);

// TODO: Will need set test accounts to verify that the results are correct. For now,
Expand Down Expand Up @@ -146,7 +146,8 @@ public IEnumerator QuerySelfInfo()
QueryUserInfoCallbackInfo? queryResult = null;
_userInfoInterface.QueryUserInfo(ref queryOptions, null, (ref QueryUserInfoCallbackInfo data) => { queryResult = data; });

yield return new WaitUntil(() => queryResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => queryResult != null);

if (queryResult != null)
{
Assert.AreEqual(Result.Success, queryResult.Value.ResultCode, "Could not query for self.");
Expand Down Expand Up @@ -188,7 +189,7 @@ public IEnumerator SendReportToSelf()
SendPlayerBehaviorReportCompleteCallbackInfo? reportResult = null;
reportsHandle.SendPlayerBehaviorReport(ref reportOptions, null, (ref SendPlayerBehaviorReportCompleteCallbackInfo data) => { reportResult = data; });

yield return new WaitUntil(() => reportResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => reportResult != null);

if (reportResult != null)
{
Expand All @@ -212,7 +213,7 @@ public IEnumerator SendReportToFirstFriend()
QueryFriendsCallbackInfo? result = null;
_friendsInterface.QueryFriends(ref options, null, (ref QueryFriendsCallbackInfo data) => { result = data; });

yield return new WaitUntil(() => result != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => result != null);
if (result != null)
{
Assert.AreEqual(Result.Success, result.Value.ResultCode, "Could not query the friends list.");
Expand Down Expand Up @@ -243,7 +244,7 @@ public IEnumerator SendReportToFirstFriend()
QueryExternalAccountMappingsCallbackInfo? externalData = null;
connectHandle.QueryExternalAccountMappings(ref queryOptions, null, (ref QueryExternalAccountMappingsCallbackInfo data) => { externalData = data; });

yield return new WaitUntil(() => externalData != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => externalData != null);
if (externalData != null)
{
Assert.AreEqual(Result.Success, externalData.Value.ResultCode,
Expand Down Expand Up @@ -273,7 +274,7 @@ public IEnumerator SendReportToFirstFriend()
SendPlayerBehaviorReportCompleteCallbackInfo? reportResult = null;
reportsHandle.SendPlayerBehaviorReport(ref reportOptions, null, (ref SendPlayerBehaviorReportCompleteCallbackInfo data) => { reportResult = data; });

yield return new WaitUntil(() => reportResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => reportResult != null);

if (reportResult != null)
{
Expand All @@ -299,7 +300,7 @@ public IEnumerator ShowHideFriendsOverlay()
null,
(ref ShowFriendsCallbackInfo data) => { overlayResult = data; });

yield return new WaitUntil(() => overlayResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => overlayResult != null);
if (overlayResult != null)
{
Assert.AreEqual(Result.Success, overlayResult.Value.ResultCode, "Could not notify overlay to show friends");
Expand All @@ -315,7 +316,7 @@ public IEnumerator ShowHideFriendsOverlay()
null,
(ref HideFriendsCallbackInfo data) => { hideResult = data; });

yield return new WaitUntil(() => hideResult != null);
yield return new WaitUntilDone(GlobalTestTimeout, () => hideResult != null);
if (hideResult != null)
{
Assert.AreEqual(Result.Success, hideResult.Value.ResultCode, "Could not notify overlay to hide friends");
Expand Down
12 changes: 11 additions & 1 deletion com.playeveryware.eos/Runtime/Core/EOSManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#endif

// This define controls if the EOS SDK should be unloaded in the editor at shutdown to work around DLL unload errors.
//#define EOS_DO_NOT_UNLOAD_SDK_ON_SHUTDOWN
#define EOS_DO_NOT_UNLOAD_SDK_ON_SHUTDOWN

Comment thread
matt-clarke marked this conversation as resolved.
Outdated
// On macOS and Linux, there isn't a known reliable way to unload shared libraries, therefore this is the default behavior.
#if (UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX)
Comment thread
matt-clarke marked this conversation as resolved.
Outdated
Expand Down Expand Up @@ -1640,6 +1640,16 @@ public void OnApplicationShutdown()
Log("Waiting for pending finalizers.");
System.GC.WaitForPendingFinalizers();
#endif
Log("Disposing notification handles before platform release.");
s_notifyLoginStatusChangedCallbackHandle?.Dispose();
s_notifyLoginStatusChangedCallbackHandle = null;

s_notifyConnectLoginStatusChangedCallbackHandle?.Dispose();
s_notifyConnectLoginStatusChangedCallbackHandle = null;

s_notifyConnectAuthExpirationCallbackHandle?.Dispose();
s_notifyConnectAuthExpirationCallbackHandle = null;

Log("Releasing the EOS Platform Interface.");
GetEOSPlatformInterface()?.Release();

Expand Down