Muawiya-contact opened a new issue, #327:
URL: https://github.com/apache/hugegraph-ai/issues/327

   ### Bug Type (问题类型)
   
   None
   
   ### Before submit
   
   - [x] I had searched in the 
[issues](https://github.com/apache/hugegraph-ai/issues) and found no similar 
issues.
   
   ### Environment (环境信息)
   
   <html>
   <body>
   <!--StartFragment--><html><head></head><body><hr>
   <h2>Environment</h2>
   
   Item | Detail
   -- | --
   Module | python-client
   File | hugegraph-python-client/src/tests/test_gremlin.py
   Affected Lines | L41–52 (setUpClass)
   
   
   <hr></body></html><!--EndFragment-->
   </body>
   </html>
   
   ### Expected & Actual behavior (期望与实际表现)
   
   <html>
   <body>
   <h2>Expected &amp; Actual Behavior</h2>
   <h3>Problem</h3>
   <p>The <code>skip_gremlin_tests</code> probe inside <code>setUpClass</code> 
(L41–52) silently skips <strong>all 6 Gremlin integration tests</strong> 
whenever the Gremlin endpoint returns a <code>404</code>, times out, or raises 
a connection error.</p>
   <p>This is a silent-skip anti-pattern: a future regression would surface in 
CI as <strong>6 skipped</strong> rather than <strong>6 failed</strong>, making 
it invisible to reviewers and breaking the reliability of the test suite.</p>
   <h3>Expected</h3>
   <p>Any connectivity or response failure during the probe should <strong>fail 
loudly</strong> — the same principle applied to the auth probe fix in #325.</p>
   <h3>Actual</h3>
   <p>The probe swallows <code>404 / timeout / connection error</code> and 
marks the entire class as skipped via <code>unittest.skip</code>, hiding real 
failures behind a green (skipped) status.</p>
   <hr>
   <h2>Suggested Fix</h2>
   <p>Two equivalent options:</p>
   <p><strong>Option A — Drop the probe entirely</strong></p>
   <p>Remove <code>skip_gremlin_tests</code> and let the first test fail 
naturally if the endpoint is unavailable. This is the simplest fix and mirrors 
standard integration-test practice.</p>
   <p><strong>Option B — Convert the 404 branch to 
<code>AssertionError</code></strong></p>
   <pre><code class="language-python"># Before (silent skip)
   except (ConnectionError, Timeout, HTTPError):
       raise unittest.SkipTest("Gremlin endpoint unavailable")
   
   # After (loud failure)
   except (ConnectionError, Timeout, HTTPError) as e:
       raise AssertionError(
           f"Gremlin endpoint probe failed — endpoint may be down or 
misconfigured: {e}"
       )
   </code></pre>
   <p>Either option ensures regressions surface as <strong>failures</strong>, 
not silent skips.</p>
   <hr>
   <h2>Related Issues</h2>
   <ul>
   <li>#325</li>
   <li>#320</li>
   </ul>
   <hr>
   <h2>Labels</h2>
   <p><code>test</code> 
<code>python-client</code></p></body></html><!--EndFragment-->
   </body>
   </html>
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   
   ```
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   
   ```


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

Reply via email to