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

[NOID] Fix flaky ConfigTest #3559

Merged
merged 2 commits into from
May 5, 2023
Merged

[NOID] Fix flaky ConfigTest #3559

merged 2 commits into from
May 5, 2023

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented May 3, 2023

No description provided.

@vga91 vga91 marked this pull request as draft May 3, 2023 11:15
@vga91 vga91 force-pushed the fix-flaky-ConfigTest branch 3 times, most recently from 6401f0a to 207be0f Compare May 4, 2023 07:23
@vga91 vga91 marked this pull request as ready for review May 4, 2023 07:24
@vga91 vga91 added the 4.4 label May 4, 2023
Comment on lines 51 to 80
@Rule
public final ProvideSystemProperty systemPropertyRule
= new ProvideSystemProperty("foo", "bar")
.and("apoc.import.enabled", "true")
.and("apoc.trigger.refresh", "2000")
.and("apoc.jobs.scheduled.num_threads", "4")
.and("apoc.static.test", "one")
.and("apoc.jdbc.cassandra_songs.url", "jdbc:cassandra://localhost:9042/playlist");

@Rule
public DbmsRule db = new ImpermanentDbmsRule();

@BeforeClass
public static void setUp() throws Exception {
final File conf = new File(directory, "apoc.conf");
try (FileWriter writer = new FileWriter(conf)) {
writer.write(String.join("\n",
"foo=bar",
"apoc.import.enabled" + "=true",
TRIGGER_REFRESH + "=2000",
APOC_CONFIG_JOBS_SCHEDULED_NUM_THREADS + "=4",
"apoc.static.test=one",
"apoc.jdbc.cassandra_songs.url=jdbc:cassandra://localhost:9042/playlist"
));
}

System.setProperty(SUN_JAVA_COMMAND, "config-dir=" + directory.getAbsolutePath());
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are we removing the flakiness here? I don't see the difference between writing the file to the file system and having those properties set.

Also the config that is causing issues in the CI, apoc.trigger.enabled is not among these.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial idea was to give a shot using an "apoc.conf" like TriggerNewProceduresTest, which seems not to be flaky.

But rethinking about it, perhaps it is the latter that causes the flakyness,
since this line likely remains during the ConfigTest, hence the error.

Now I did the vice versa, ie changed all the tests that leverage the "apoc.conf" file consistently with the ConfigTest one.

Copy link
Contributor

@ncordon ncordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure this would remove the flakiness

@vga91 vga91 force-pushed the fix-flaky-ConfigTest branch 2 times, most recently from a265227 to eb67260 Compare May 5, 2023 08:30
@vga91 vga91 force-pushed the fix-flaky-ConfigTest branch from eb67260 to 942ce00 Compare May 5, 2023 10:03
@vga91 vga91 force-pushed the fix-flaky-ConfigTest branch from 942ce00 to 0397ee5 Compare May 5, 2023 10:04
@vga91 vga91 merged commit f4e9770 into 4.4 May 5, 2023
@vga91 vga91 deleted the fix-flaky-ConfigTest branch May 5, 2023 16:12
vga91 added a commit to neo4j/apoc that referenced this pull request May 19, 2023
* [NOID] Fix flaky ConfigTest

* [NOID] changed apocConfig test handling
vga91 added a commit that referenced this pull request May 19, 2023
* [NOID] Fix flaky ConfigTest

* [NOID] changed apocConfig test handling
vga91 added a commit to neo4j/apoc that referenced this pull request May 19, 2023
#414)

* [NOID] Fix flaky ConfigTest

* [NOID] changed apocConfig test handling
vga91 added a commit that referenced this pull request May 22, 2023
* [NOID] Fix flaky ConfigTest

* [NOID] changed apocConfig test handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants