Commit fc79763
committed
Refactor UserMetadataUpdater tests, optimize batch logic
- Split UserMetadataUpdater tests into focused files: Basic, Insert, License, Manager, and Metadata, improving organization and maintainability.
- Added UserMetadataUpdaterMetadataTests covering metadata enrichment, nullification, whitespace trimming, and lookup entity reuse.
- Improved batching performance in user/manager/license processing by replacing .Skip().Take() with .GetRange().
- Optimized manager resolution with O(1) AAD ID lookups and ensured tracked entities are used to prevent duplicate key errors.
- Enhanced handling of null/cleared metadata fields and duplicate UPNs.
- Updated .csproj to include new test files and removed old test region from UserImportTests.cs.1 parent 3485bd2 commit fc79763
File tree
11 files changed
+1964
-2755
lines changed- src/AnalyticsEngine
- Tests.UnitTests
- WebJob.Office365ActivityImporter.Engine/Graph/User
11 files changed
+1964
-2755
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
0 commit comments