mehulbatraa commented on code in PR #711:
URL: https://github.com/apache/iceberg-python/pull/711#discussion_r1603210840


##########
tests/catalog/test_glue.py:
##########
@@ -848,3 +848,17 @@ def test_table_exists(
     assert test_catalog.table_exists(identifier) is True
     # Act and Assert for a non-existing table
     assert test_catalog.table_exists(('non', 'exist')) is False
+
+
+@mock_aws
+def test_register_table_with_given_location(
+    _bucket_initialize: None, moto_endpoint_url: str, metadata_location: str, 
database_name: str, table_name: str
+) -> None:
+    catalog_name = "glue"
+    identifier = (database_name, table_name)
+    location = metadata_location
+    test_catalog = GlueCatalog(catalog_name, **{"s3.endpoint": 
moto_endpoint_url, "warehouse": f"s3://{BUCKET_NAME}"})
+    test_catalog.create_namespace(namespace=database_name, 
properties={"location": f"s3://{BUCKET_NAME}/{database_name}.db"})
+    table = test_catalog.register_table(identifier, location)
+    assert table.identifier == (catalog_name,) + identifier
+    assert test_catalog.table_exists(identifier) is True

Review Comment:
   I got past that error, but now there is another error that I am getting 
intermittently, I could see my table got registered with the integration test 
and passed all the assert cases
   <img width="1288" alt="image" 
src="https://github.com/apache/iceberg-python/assets/168829072/871dee2d-cec2-4864-a340-84900c8b5538";>
   
   But it fails when it tries to run the tier down.
   Specifically this part:
   `  clean_up(test_catalog)`  
   
   <img width="1454" alt="image" 
src="https://github.com/apache/iceberg-python/assets/168829072/e03359f8-9456-4deb-96ca-882e2ebadaef";>
   
   



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