davsclaus commented on code in PR #30390:
URL: https://github.com/apache/camel/pull/30390#discussion_r4651894047
##########
components/camel-opa/src/test/java/org/apache/camel/component/opa/OpaReloadableWasmEvaluatorTest.java:
##########
@@ -269,6 +270,52 @@ void managedWatcherDoesNotBuildTheSameFailedContentAgain()
throws Exception {
}
}
+ @Test
+ void
pollingSkipsUnchangedMalformedDataButExplicitReloadRetriesAndChangedContentRecovers()
throws Exception {
Review Comment:
Added `aLoaderThatReusesItsBufferDoesNotChangeTheBuiltModule` in
35c2b018b44d: the loader hands out the same byte array on every load and
overwrites it after a reload. The test checks that the factory never gets the
loader's buffer and that the built module and the active revision stay as they
were. It fails when the copy at the start of `reload` is removed.
_Claude Code on behalf of Claus Ibsen_
##########
components/camel-opa/src/main/java/org/apache/camel/component/opa/OpaReloadableWasmEvaluator.java:
##########
@@ -161,6 +161,7 @@ private boolean reload(long generation, boolean
skipKnownFailure) throws Excepti
return false;
}
}
+ OpaWasmEvaluator.Bundle bundle = immutableBundle(loaded);
Review Comment:
Fixed in 35c2b018b44d: `immutableBundle` is split. The reload path now only
checks the data (`validData`), because `loaded` is already its own copy. The
constructor path still copies once through `immutableBundle`.
_Claude Code on behalf of Claus Ibsen_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]