-
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
[NOID] Fix flaky ConfigTest #3559
Conversation
6401f0a
to
207be0f
Compare
@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()); | ||
} | ||
|
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.
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.
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.
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.
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.
I'm not really sure this would remove the flakiness
a265227
to
eb67260
Compare
eb67260
to
942ce00
Compare
942ce00
to
0397ee5
Compare
* [NOID] Fix flaky ConfigTest * [NOID] changed apocConfig test handling
* [NOID] Fix flaky ConfigTest * [NOID] changed apocConfig test handling
#414) * [NOID] Fix flaky ConfigTest * [NOID] changed apocConfig test handling
* [NOID] Fix flaky ConfigTest * [NOID] changed apocConfig test handling
No description provided.