diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index f00375552..d49973802 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -1,4 +1,4 @@ -name: Build and run Id Web tests +name: "Id Web GitHub Action Test" on: push: @@ -17,7 +17,7 @@ jobs: build: runs-on: windows-latest continue-on-error: true - name: IdWeb GitHub Action Test + name: "Id Web GitHub Action Test" steps: - name: Checkout repository uses: actions/checkout@v2.3.4 diff --git a/tests/Microsoft.Identity.Web.Test/CacheEncryptionTests.cs b/tests/Microsoft.Identity.Web.Test/CacheEncryptionTests.cs index b54b61bb8..a84157783 100644 --- a/tests/Microsoft.Identity.Web.Test/CacheEncryptionTests.cs +++ b/tests/Microsoft.Identity.Web.Test/CacheEncryptionTests.cs @@ -79,12 +79,9 @@ private byte[] GetFirstCacheValue(MemoryCache memoryCache) .GetType() .GetField("_coherentState", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)! .GetValue(memoryCache)!; - Type? content1Type = content1?.GetType(); - // The internals of CoherentState seem to change between .NET 9 RCs - memoryCacheContent = (( - content1Type?.GetProperty("_entries", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) ?? - content1Type?.GetProperty("_stringEntries", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) - ) + memoryCacheContent = (content1? + .GetType() + .GetProperty("StringEntriesCollection", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) .GetValue(content1) as IDictionary)!; #else memoryCacheContent = (memoryCache