Skip to content

Commit 73a4a5a

Browse files
committed
Fix testVersionHandlerActivation
1 parent c289496 commit 73a4a5a

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/test.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,13 @@ jobs:
105105
timeout-minutes: 60
106106
run: |
107107
# DISABLE: NUnit test is currently broken from Unity 2019
108-
# DISABLE: testVersionHandlerActivationBatchMode is causing timeout.
109108
./gradlew test -q \
110109
-PINTERACTIVE_MODE_TESTS_ENABLED=0 \
111110
-PINCLUDE_TEST_TYPES="${{ needs.check_and_prepare.outputs.include_test_types }}" \
112111
-PEXCLUDE_TEST_TYPES="NUnit,${{ needs.check_and_prepare.outputs.exclude_test_types }}" \
113112
-PINCLUDE_TEST_MODULES="${{ needs.check_and_prepare.outputs.include_test_modules }}" \
114113
-PEXCLUDE_TEST_MODULES="${{ needs.check_and_prepare.outputs.exclude_test_modules }}" \
115-
-PEXCLUDE_TESTS="testVersionHandlerActivationBatchMode,${{ needs.check_and_prepare.outputs.exclude_tests }}"
114+
-PEXCLUDE_TESTS="${{ needs.check_and_prepare.outputs.exclude_tests }}"
116115
117116
- name: Print test log
118117
if: always()

source/VersionHandler/src/VersionHandler.cs

+6
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ static VersionHandler() {
118118
} else {
119119
EditorApplication.update -= BootStrap;
120120
EditorApplication.update += BootStrap;
121+
// A workaround to make sure bootstrap continues if Unity reloads assemblies
122+
// during bootstrapping. The issue only observed in Unity 2019 and 2020
123+
float unityVersion = GetUnityVersionMajorMinor();
124+
if (unityVersion < 2021.0f && unityVersion >= 2019.0f) {
125+
var type = BootStrappedImpl;
126+
}
121127
}
122128
}
123129

source/VersionHandlerImpl/test/activation/Assets/PlayServicesResolver/Editor/TestEnabledCallback.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ private static Dictionary<string, Type> EntryPoints {
4242
{
4343
"IOS Resolver",
4444
Google.VersionHandler.FindClass("Google.IOSResolver", "Google.IOSResolver")
45-
}
45+
},
46+
{
47+
"Package Manager Resolver",
48+
Google.VersionHandler.FindClass("Google.PackageManagerResolver", "Google.PackageManagerResolver")
49+
}
4650
};
4751
}
4852
}

0 commit comments

Comments
 (0)