Copilot commented on code in PR #6800:
URL: https://github.com/apache/texera/pull/6800#discussion_r3634634244


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/fetcher/URLFetcherOpExecSpec.scala:
##########
@@ -44,4 +44,21 @@ class URLFetcherOpExecSpec extends AnyFlatSpec with 
BeforeAndAfter {
     assert(!iterator.hasNext)
   }
 
+  // On a failed fetch the fallback message must interpolate `desc.url` itself,
+  // not the descriptor's reflectionToString dump. A file:// URL to a 
nonexistent
+  // path makes getInputStreamFromURL return None deterministically and 
offline,
+  // so the failure branch is exercised without depending on external 
connectivity.
+  it should "report only the URL, not the operator descriptor, when the fetch 
fails" in {
+    opDesc.url = "file:///nonexistent/texera-urlfetcher-regression"
+    opDesc.decodingMethod = DecodingMethod.UTF_8
+    val fetcherOpExec = new 
URLFetcherOpExec(objectMapper.writeValueAsString(opDesc))
+    val content = 
fetcherOpExec.produceTuple().next().getFields.toList.head.asInstanceOf[String]

Review Comment:
   The regression test uses a hard-coded absolute path 
(`file:///nonexistent/...`) as the “missing” URL. That path is not guaranteed 
to be absent on all developer/CI machines, which can make the test flaky (it 
could start succeeding and stop exercising the failure branch). Consider 
generating a guaranteed-nonexistent `file://` URL via a temp directory plus a 
missing filename.



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