Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise LRU trim logic #475

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

merge

ff02c46
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

Revise LRU trim logic #475

merge
ff02c46
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / test results (win net4.8) failed Nov 13, 2023 in 0s

902 passed, 6 failed and 16 skipped

Tests failed

Report Passed Failed Skipped Time
BitFaster.Caching.UnitTests/TestResults/results4.trx 902✔️ 6❌ 16✖️ 81s

Annotations

Check failure on line 1163 in BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs

See this annotation in the file changed.

@github-actions github-actions / test results (win net4.8)

BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests ► WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(trimCount: 4, expected: [9, 8, 7, 6, 5])

Failed test found in:
  BitFaster.Caching.UnitTests/TestResults/results4.trx
Error:
  Expected lru.Keys[2] to be 7, but found 6.
  
  With configuration:
  - Use declared types and members
  - Compare enums by value
  - Compare tuples by their properties
  - Compare anonymous types by their properties
  - Compare records by their members
  - Include non-browsable members
  - Include all non-private properties
  - Include all non-private fields
  - Match member by name (or throw)
  - Be strict about the order of items in byte arrays
  - Without automatic conversion.
  
Raw output
Expected lru.Keys[2] to be 7, but found 6.

With configuration:
- Use declared types and members
- Compare enums by value
- Compare tuples by their properties
- Compare anonymous types by their properties
- Compare records by their members
- Include non-browsable members
- Include all non-private properties
- Include all non-private fields
- Match member by name (or throw)
- Be strict about the order of items in byte arrays
- Without automatic conversion.

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context)
   at FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(Comparands comparands, EquivalencyValidationContext context)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, Func`2 config, String because, Object[] becauseArgs)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, String because, Object[] becauseArgs)
   at BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests.WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(Int32 trimCount, Int32[] expected) in D:\a\BitFaster.Caching\BitFaster.Caching\BitFaster.Caching.UnitTests\Lru\ConcurrentLruTests.cs:line 1163

Check failure on line 1163 in BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs

See this annotation in the file changed.

@github-actions github-actions / test results (win net4.8)

BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests ► WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(trimCount: 5, expected: [9, 8, 7, 6])

Failed test found in:
  BitFaster.Caching.UnitTests/TestResults/results4.trx
Error:
  Expected lru.Keys[1] to be 8, but found 5.
  Expected lru.Keys[2] to be 7, but found 6.
  
  With configuration:
  - Use declared types and members
  - Compare enums by value
  - Compare tuples by their properties
  - Compare anonymous types by their properties
  - Compare records by their members
  - Include non-browsable members
  - Include all non-private properties
  - Include all non-private fields
  - Match member by name (or throw)
  - Be strict about the order of items in byte arrays
  - Without automatic conversion.
  
Raw output
Expected lru.Keys[1] to be 8, but found 5.
Expected lru.Keys[2] to be 7, but found 6.

With configuration:
- Use declared types and members
- Compare enums by value
- Compare tuples by their properties
- Compare anonymous types by their properties
- Compare records by their members
- Include non-browsable members
- Include all non-private properties
- Include all non-private fields
- Match member by name (or throw)
- Be strict about the order of items in byte arrays
- Without automatic conversion.

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context)
   at FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(Comparands comparands, EquivalencyValidationContext context)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, Func`2 config, String because, Object[] becauseArgs)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, String because, Object[] becauseArgs)
   at BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests.WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(Int32 trimCount, Int32[] expected) in D:\a\BitFaster.Caching\BitFaster.Caching\BitFaster.Caching.UnitTests\Lru\ConcurrentLruTests.cs:line 1163

Check failure on line 1163 in BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs

See this annotation in the file changed.

@github-actions github-actions / test results (win net4.8)

BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests ► WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(trimCount: 6, expected: [9, 8, 7])

Failed test found in:
  BitFaster.Caching.UnitTests/TestResults/results4.trx
Error:
  Expected lru.Keys[0] to be 9, but found 4.
  Expected lru.Keys[1] to be 8, but found 5.
  Expected lru.Keys[2] to be 7, but found 6.
  
  With configuration:
  - Use declared types and members
  - Compare enums by value
  - Compare tuples by their properties
  - Compare anonymous types by their properties
  - Compare records by their members
  - Include non-browsable members
  - Include all non-private properties
  - Include all non-private fields
  - Match member by name (or throw)
  - Be strict about the order of items in byte arrays
  - Without automatic conversion.
  
Raw output
Expected lru.Keys[0] to be 9, but found 4.
Expected lru.Keys[1] to be 8, but found 5.
Expected lru.Keys[2] to be 7, but found 6.

With configuration:
- Use declared types and members
- Compare enums by value
- Compare tuples by their properties
- Compare anonymous types by their properties
- Compare records by their members
- Include non-browsable members
- Include all non-private properties
- Include all non-private fields
- Match member by name (or throw)
- Be strict about the order of items in byte arrays
- Without automatic conversion.

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context)
   at FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(Comparands comparands, EquivalencyValidationContext context)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, Func`2 config, String because, Object[] becauseArgs)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, String because, Object[] becauseArgs)
   at BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests.WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(Int32 trimCount, Int32[] expected) in D:\a\BitFaster.Caching\BitFaster.Caching\BitFaster.Caching.UnitTests\Lru\ConcurrentLruTests.cs:line 1163

Check failure on line 1163 in BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs

See this annotation in the file changed.

@github-actions github-actions / test results (win net4.8)

BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests ► WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(trimCount: 7, expected: [9, 8])

Failed test found in:
  BitFaster.Caching.UnitTests/TestResults/results4.trx
Error:
  Expected lru.Keys to be a collection with 2 item(s), but {4, 5, 6}
  contains 1 item(s) more than
  {9, 8}.
  
  With configuration:
  - Use declared types and members
  - Compare enums by value
  - Compare tuples by their properties
  - Compare anonymous types by their properties
  - Compare records by their members
  - Include non-browsable members
  - Include all non-private properties
  - Include all non-private fields
  - Match member by name (or throw)
  - Be strict about the order of items in byte arrays
  - Without automatic conversion.
  
Raw output
Expected lru.Keys to be a collection with 2 item(s), but {4, 5, 6}
contains 1 item(s) more than
{9, 8}.

With configuration:
- Use declared types and members
- Compare enums by value
- Compare tuples by their properties
- Compare anonymous types by their properties
- Compare records by their members
- Include non-browsable members
- Include all non-private properties
- Include all non-private fields
- Match member by name (or throw)
- Be strict about the order of items in byte arrays
- Without automatic conversion.

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context)
   at FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(Comparands comparands, EquivalencyValidationContext context)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, Func`2 config, String because, Object[] becauseArgs)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, String because, Object[] becauseArgs)
   at BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests.WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(Int32 trimCount, Int32[] expected) in D:\a\BitFaster.Caching\BitFaster.Caching\BitFaster.Caching.UnitTests\Lru\ConcurrentLruTests.cs:line 1163

Check failure on line 1163 in BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs

See this annotation in the file changed.

@github-actions github-actions / test results (win net4.8)

BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests ► WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(trimCount: 8, expected: [9])

Failed test found in:
  BitFaster.Caching.UnitTests/TestResults/results4.trx
Error:
  Expected lru.Keys to be a collection with 1 item(s), but {4, 5, 6}
  contains 2 item(s) more than
  {9}.
  
  With configuration:
  - Use declared types and members
  - Compare enums by value
  - Compare tuples by their properties
  - Compare anonymous types by their properties
  - Compare records by their members
  - Include non-browsable members
  - Include all non-private properties
  - Include all non-private fields
  - Match member by name (or throw)
  - Be strict about the order of items in byte arrays
  - Without automatic conversion.
  
Raw output
Expected lru.Keys to be a collection with 1 item(s), but {4, 5, 6}
contains 2 item(s) more than
{9}.

With configuration:
- Use declared types and members
- Compare enums by value
- Compare tuples by their properties
- Compare anonymous types by their properties
- Compare records by their members
- Include non-browsable members
- Include all non-private properties
- Include all non-private fields
- Match member by name (or throw)
- Be strict about the order of items in byte arrays
- Without automatic conversion.

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context)
   at FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(Comparands comparands, EquivalencyValidationContext context)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, Func`2 config, String because, Object[] becauseArgs)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, String because, Object[] becauseArgs)
   at BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests.WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(Int32 trimCount, Int32[] expected) in D:\a\BitFaster.Caching\BitFaster.Caching\BitFaster.Caching.UnitTests\Lru\ConcurrentLruTests.cs:line 1163

Check failure on line 1163 in BitFaster.Caching.UnitTests/Lru/ConcurrentLruTests.cs

See this annotation in the file changed.

@github-actions github-actions / test results (win net4.8)

BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests ► WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(trimCount: 9, expected: [])

Failed test found in:
  BitFaster.Caching.UnitTests/TestResults/results4.trx
Error:
  Expected lru.Keys to be a collection with 0 item(s), but {4, 5, 6}
  contains 3 item(s).
  
  With configuration:
  - Use declared types and members
  - Compare enums by value
  - Compare tuples by their properties
  - Compare anonymous types by their properties
  - Compare records by their members
  - Include non-browsable members
  - Include all non-private properties
  - Include all non-private fields
  - Match member by name (or throw)
  - Be strict about the order of items in byte arrays
  - Without automatic conversion.
  
Raw output
Expected lru.Keys to be a collection with 0 item(s), but {4, 5, 6}
contains 3 item(s).

With configuration:
- Use declared types and members
- Compare enums by value
- Compare tuples by their properties
- Compare anonymous types by their properties
- Compare records by their members
- Include non-browsable members
- Include all non-private properties
- Include all non-private fields
- Match member by name (or throw)
- Be strict about the order of items in byte arrays
- Without automatic conversion.

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context)
   at FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(Comparands comparands, EquivalencyValidationContext context)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, Func`2 config, String because, Object[] becauseArgs)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.BeEquivalentTo[TExpectation](IEnumerable`1 expectation, String because, Object[] becauseArgs)
   at BitFaster.Caching.UnitTests.Lru.ConcurrentLruTests.WhenColdItemsAreTouchedTrimRemovesExpectedItemCount(Int32 trimCount, Int32[] expected) in D:\a\BitFaster.Caching\BitFaster.Caching\BitFaster.Caching.UnitTests\Lru\ConcurrentLruTests.cs:line 1163