-
Notifications
You must be signed in to change notification settings - Fork 495
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
[gRNAet7B] Try de-flaky some tests with new procedure triggers #3355
Merged
Conversation
This file contains 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
vga91
changed the title
Try de-flaky some tests with new procedure triggers
[gRNAet7B] Try de-flaky some tests with new procedure triggers
Dec 6, 2022
vga91
force-pushed
the
fix_flaky_trigger_new_procs
branch
from
December 6, 2022 10:52
f741376
to
f25e0bb
Compare
About this comment #3335 (comment). |
AzuObs
approved these changes
Dec 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Well done!
vga91
added a commit
to neo4j/apoc
that referenced
this pull request
Dec 15, 2022
…-contrib/neo4j-apoc-procedures#3355) * Try de-flaky some tests with new procedure triggers * moved TriggerTestUtil and increased trigger.refresh value * added waitDbsAvailable util
vga91
added a commit
to neo4j/apoc
that referenced
this pull request
Dec 15, 2022
…-contrib/neo4j-apoc-procedures#3355) * Try de-flaky some tests with new procedure triggers * moved TriggerTestUtil and increased trigger.refresh value * added waitDbsAvailable util
vga91
added a commit
to neo4j/apoc
that referenced
this pull request
Jan 3, 2023
…-contrib/neo4j-apoc-procedures#3355) * Try de-flaky some tests with new procedure triggers * moved TriggerTestUtil and increased trigger.refresh value * added waitDbsAvailable util
vga91
added a commit
to neo4j/apoc
that referenced
this pull request
Jan 5, 2023
…-contrib/neo4j-apoc-procedures#3355) * Try de-flaky some tests with new procedure triggers * moved TriggerTestUtil and increased trigger.refresh value * added waitDbsAvailable util
vga91
added a commit
to neo4j/apoc
that referenced
this pull request
Jan 9, 2023
* [gRNAet7B] Fixes trigger procedures in clusters (#3183) * [gRNAet7B] Leaves it working for add trigger * [gRNAet7B] Fixes trigger procedures with split LifeCycle and System utils * Deprecated old triggers and included warning - Added check to fail if they are executed against a system = FOLLOWER * Added cluster tests * removed unused import * changed msg wording * split deprecated and new triggers * Fixed TriggerExtendedTest * update apoc.systemdb.export.metadata * remove lastUpdate, rename classes * added eventual consistency * commonize trigger new and deprec. cache * ignored tests * added eventually separated tests - restored util.validateQuery - small changes * renamed Trigger classes * var names - test changes and additions * nitpick and lightened test * test flaky cluster Co-authored-by: Giuseppe Villani <[email protected]> * [gRNAet7B] Trigger procedures neo4j 5.x changes * [gRNAet7B] code clean - removed unused import * [gRNAet7B] Try fix flaky TriggerClusterRoutingTest (neo4j-contrib/neo4j-apoc-procedures#3323) * [gRNAet7B] fix some tests * [gRNAet7B] fix TriggerClusterRoutingTest * [gRNAet7B] fix TriggerRouting error message * [gRNAet7B] Added trigger show procedure (neo4j-contrib/neo4j-apoc-procedures#3335) * Fix flaky trigger dbms availability tests * added apoc.trigger.show proc * retry to fix flaky test by separating setLastUpdate() * removed updated output - some code refactoring * split pr - changes review * removed inner transaction * updated documentation * reset wrong generated docs * Added admin in trigger.show * small adoc changes * [gRNAet7B] Try de-flaky some tests with new procedure triggers (neo4j-contrib/neo4j-apoc-procedures#3355) * Try de-flaky some tests with new procedure triggers * moved TriggerTestUtil and increased trigger.refresh value * added waitDbsAvailable util * [gRNAet7B] removed unused import * [gRNAet7B] fix cluster test * [gRNAet7B] added documentation about new trigger procedures and deprecated ones (neo4j-contrib/neo4j-apoc-procedures#3325) * [gRNAet7B] added trigger new procs documentation * changes review - procedure description * changed listener wording * added system db note * var. small changes * [gRNAet7B] Fixes triggers (neo4j-contrib/neo4j-apoc-procedures#3369) * [coZSswV2] Fix typo in triggers error message * [coZSswV2] Assert new triggers can't add TransactionEventListeners to "system" * [coZSswV2] Assert old triggers can't add TransactionEventListeners to "system" * [gRNAet7B] removed unused import * [gRNAet7B] moved TriggerInfo class, removed wrong extended file * [gRNAet7B] Add @Admin to trigger procedures (neo4j-contrib/neo4j-apoc-procedures#3357) * [qwJFy8pp] Add @Admin to trigger procedures * added admin in trigger.list and docs note * changed admin doc * [gRNAet7B] moved classes - changed TriggerInfo - err. handling changes * [gRNAet7B] Cleanup trigger docs (neo4j-contrib/neo4j-apoc-procedures#3378) * [gRNAet7B] added TriggerEnterpriseFeaturesTest, removed log and session db check * [gRNAet7B] changed descriptions consistently with to Trigger.java 5.x ones Co-authored-by: Nacho Cordón <[email protected]> Co-authored-by: Daniel Leaver <[email protected]>
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.
I cannot replicate this test with a real instance, so maybe is a
TestDatabaseManagementServiceBuilder
problem.To solve this flaky test perhaps either we have to increase the
apoc.trigger.refresh
value or we have to separate the transactions inTrigger
system node updates andsetLastUpdate
([i.e. in that way]ff6e192).I've been trying to figure out why these two things seem to de-flaky the tests, but i'm not really sure about it :X
Of course, the 2nd way it's not not recommended because we change the implementation and make the code less optimized.
In addition, to further stabilize the tests, I added a
waitDbsAvailable
.Without these edits, with the embedded neo4j test instances, it seems like very rarely the TriggerHandler.updateCache() can't find the installed/updated node, but because of
lastUpdate = System.currentTimeMillis();
(TriggerHandler, line 83 ) the updateCache is no longer called due toif (getLastUpdate() > lastUpdate) {
(TriggerHandler, line 283).