OyvindLGjesdal commented on PR #3063:
URL: https://github.com/apache/jena/pull/3063#issuecomment-2727633929

   Hi @afs 
   
   I think you are right that the tests I added are not related to the failures.
   
   It looks to me that (one of) the errors is that 
HttpLib.exception(httpResponse, httpStatusCode) can sometimes cause failures.
   
   My understanding that I’m not confident in:
   
   The `TestFusekiShaclValidation.shacl_no_data_graph` failure  seems to go 
away by removing usage of  the method `HttpException exception(httpResponse, 
httpStatusCode)` in `  `void handleHttpStatusCode(HttpResponse<InputStream> 
response)` in the HttpLib class, and replacing it with the exception handling 
and `void finish(httpResponse<InputStream>)` that is also used for the case of 
300-399 return codes. This removes use of the httpResponse body in the returned 
exception message, so this is  for experimenting, and no fix. I also see other 
errors sometimes that may not have been there before. The exception method is 
only used in these cases for 400-499 and  500-599. Could consume 
   
   Most notable difference to me is that 
`finish(hr)->finish->(in)->consume(final in)` does not close the `in` and  the 
`exception method does (using finally { IO.close(in); }`).
   
   I *think* this is the steps in `shacl_no_data_graph` when the test fails:

   
   * `expect404(…)` passes.
   * `conn.update("CLEAR ALL»);` then tries to run, but the connection is 
already closed (sometimes). 
   
   ## After the change
   There are also some other new(?) CI errors  that then show up, like in 
TestFusekiStdReadOnlySetup.stdSetup_endpoint_7, which returns:
   
   ```
    TestFusekiStdReadOnlySetup.stdSetup_endpoint_7:112 PUT 
http://localhost:41455/ds/data :: ==> expected: <405> but was: <-1>
   ```
   
   ## Other things 
   
    * It looks like the function copied from commons-io for consume has new 
code, I tried it, but it made no difference. Have reverted.
    * There was a similar error message in selenium 
https://github.com/SeleniumHQ/selenium/issues/11798  caused by a bug in the 
HttpClient which was turned into a JDK bug and fixed in Java22 
(https://bugs.java.com/bugdatabase/view_bug?bug_id=8304701). Using the 
workaround of setting Redirect.NONE in the default http client had no effect 
afaik. Could still test if current main runs without issues on 22 in 
github-actions.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to