Add tests for new insert rules consequence (part 2)#1135
Merged
timkimadobe merged 7 commits intoadobe:feature/historical-consequencefrom Apr 30, 2025
Merged
Conversation
14ad1b5 to
b835de3
Compare
…orical event operation # Conflicts: # AEPCore.xcodeproj/project.pbxproj
Remove unneeded getHistoricalEvents delay helper in mock
b835de3 to
f8c06a3
Compare
| // Should not be dispatched | ||
| XCTAssertEqual(0, mockRuntime.dispatchedEvents.count) | ||
| } | ||
| } |
There was a problem hiding this comment.
nit : Can we also add a test case for testSchemaConsequenceInsert_doesNotDispatchOrRecord_whenContentIsEmpty
Contributor
Author
There was a problem hiding this comment.
This test case does exist, but it's on line 121. I was thinking it could be better to group it with the valid input tests, since the issue is that an empty content results in a hash of 0, rather than the input format itself being invalid. What do you think?
There was a problem hiding this comment.
Ah I missed it. Should be fine where it is now too
spoorthipujariadobe
approved these changes
Apr 30, 2025
20d000d
into
adobe:feature/historical-consequence
17 checks passed
This was referenced Jul 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the tests covering the historical event operations
insertandinsertIfNotExists. At a high level, it validates:contentinsertIfNotExistscorrectly does not insert if event already exists or a database error is returned (-1)Test setup changes
The base test setup for
RulesEngineFunctionalTestshas been split into a new base class:RulesEngineTestBase, which the newRulesEngineHistoricalTestsalso uses.The
TestableExtensionRuntimehas been updated to support:recordHistoricalEventgetHistoricalEventsoperation (by default does not apply any delay)Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: