thexiay opened a new issue, #433:
URL: https://github.com/apache/iceberg-rust/issues/433

   replace test unit `rest_catalog_test::test_list_empty_namespace` to this:
   ```
   #[tokio::test]
   async fn test_list_empty_namespace() {
       let fixture = get_test_fixture("test_list_empty_namespace").await;
   
       let ns_apple = Namespace::with_properties(
           NamespaceIdent::from_strs(["a_a", "apple"]).unwrap(),
           HashMap::from([
               ("owner".to_string(), "ray".to_string()),
               ("community".to_string(), "apache".to_string()),
           ]),
       );
   
       // Currently this namespace doesn't exist, so it should return error.
       assert!(fixture
           .rest_catalog
           .list_namespaces(Some(ns_apple.name()))
           .await
           .is_err());
   
       // Create namespaces
       fixture
           .rest_catalog
           .create_namespace(ns_apple.name(), ns_apple.properties().clone())
           .await
           .unwrap();
   
       // List namespace
       let nss = fixture
           .rest_catalog
           .list_namespaces(Some(&NamespaceIdent::from_strs(["a_a", 
"apple"]).unwrap()))
           .await
           .unwrap();
       assert!(nss.is_empty());
   }
   ```
   
   and run it return 
   ```
   ---- test_list_empty_namespace stdout ----
   thread 'test_list_empty_namespace' panicked at 
crates/catalog/rest/tests/rest_catalog_test.rs:206:10:
   called `Result::unwrap()` on an `Err` value: DataInvalid => Namespace does 
not exist: a_a%1Fapple
   
   Context:
      type: NoSuchNamespaceException
      code: 404
      stack: org.apache.iceberg.exceptions.NoSuchNamespaceException: Namespace 
does not exist: a_a%1Fapple
           at 
org.apache.iceberg.jdbc.JdbcCatalog.listNamespaces(JdbcCatalog.java:338)
           at 
org.apache.iceberg.rest.CatalogHandlers.listNamespaces(CatalogHandlers.java:102)
           at 
org.apache.iceberg.rest.RESTCatalogAdapter.handleRequest(RESTCatalogAdapter.java:280)
           at 
org.apache.iceberg.rest.RESTCatalogAdapter.execute(RESTCatalogAdapter.java:444)
           at 
org.apache.iceberg.rest.RESTCatalogServlet.execute(RESTCatalogServlet.java:100)
           at 
org.apache.iceberg.rest.RESTCatalogServlet.doGet(RESTCatalogServlet.java:66)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
           at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
           at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
           at 
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772)
           at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
           at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
           at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
           at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
           at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
           at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at org.eclipse.jetty.server.Server.handle(Server.java:516)
           at 
org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
           at 
org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
           at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
           at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
           at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
           at 
org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
           at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
           at 
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
           at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
           at 
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
           at java.base/java.lang.Thread.run(Thread.java:840)
   
   ...
   ```
   


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