Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0-alpha2
-
None
-
Docs Required
Description
Consider following test: ConfigurationListenerTest#dataRace()
/** */ @Test public void dataRace() throws Exception { configuration.change(parent -> parent.changeElements(elements -> elements.create("name", e -> {})) ).get(1, SECONDS); List<String> log = new CopyOnWriteArrayList<>(); configuration.elements().get("name").listen(ctx -> { assertNull(ctx.newValue()); log.add("deleted"); return completedFuture(null); }); configuration.change(parent -> parent.changeElements(elements -> elements.delete("name")) ).get(1, SECONDS); assertEquals(List.of("deleted"), log); }
It fails due to wrong configuration access in ConfigurationNotificationsUtil.
Attachments
Issue Links
- links to