serhiy-bzhezytskyy opened a new pull request, #4642:
URL: https://github.com/apache/solr/pull/4642

   IndexFetcherPacketProtocolTest fails deterministically on main with seed 
`6FA33BD8BF6D0D4C`:
   
   ```
   IndexFetcherPacketProtocolTest > testSingleByte FAILED
       java.lang.AssertionError: fetchPackets return code mismatch expected:<0> 
but was:<1>
   ```
   
   The test stages a file into the index directory and reads it back through 
the replication fetch path. When the randomized directory factory is an 
ephemeral (RAM) one like ByteBuffersDirectory, the staged file is not visible 
to the fetch path, so the server side throws `NoSuchFileException`, no bytes 
are sent, and fetchPackets returns a non-zero code. With an FS-backed factory 
(the default random pick most of the time) it passes, which is why it looks 
flaky.
   
   This is the same reason `TestReplicationHandler` forces an FS factory via 
`useFactory(null)` in its tests — replication reads real files from the index 
dir. The SOLR-18098 test just didn't do the same.
   
   Fix: call `useFactory(null)` in `@BeforeClass` (and `resetFactory()` in 
`@AfterClass`).
   
   Verified: the previously failing seed `6FA33BD8BF6D0D4C` now passes, along 
with several other random seeds.


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