diff --git a/test/Generic_JDBC_Tests/src/H2_Spec.enso b/test/Generic_JDBC_Tests/src/H2_Spec.enso index 0e77ad8f8b91..1226a1a4141d 100644 --- a/test/Generic_JDBC_Tests/src/H2_Spec.enso +++ b/test/Generic_JDBC_Tests/src/H2_Spec.enso @@ -23,8 +23,12 @@ type H2_JDBC_Config database_root = data_dir / ("h2_tests" + (Date_Time.now.format "yyyy-MM-dd_HHmmss.f")) url = "jdbc:h2:" + database_root.path + "/test" cleanup = + IO.println "AAAAA deleting" database_root . delete_if_exists recursive=True + IO.println "AAAAA deleted" + IO.println "AAAAA exists before "+database_root.exists.to_text cleanup + IO.println "AAAAA exists after "+database_root.exists.to_text Panic.with_finalizer cleanup <| database_root . create_directory action url @@ -34,23 +38,20 @@ type H2_JDBC_Config conn = Generic_JDBC_Connection.connect url conn.should_succeed cleanup = + IO.println "AAAAA closing" conn.close + IO.println "AAAAA closed" Panic.with_finalizer cleanup <| action conn add_specs suite_builder = config = H2_JDBC_Config.Value - # Remove https://github.com/enso-org/enso/issues/12489 - is_windows = Platform.os == Platform.OS.Windows - windows_pending = if is_windows then "disabled on windows" else Nothing - - if is_windows.not then - Generic_JDBC_Connection_Spec.add_specs_for_backend config suite_builder + Generic_JDBC_Connection_Spec.add_specs_for_backend config suite_builder ## These tests are here instead of in Generic_JDBC_Connection_Spec because they are backend-dependent. - suite_builder.group "(H2) Generic JDBC Connection" pending=windows_pending group_builder-> + suite_builder.group "(H2) Generic JDBC Connection" group_builder-> with_connection = config.with_connection # Cleans things up afterwards, but also before for easier debugging. @@ -67,9 +68,15 @@ add_specs suite_builder = lower x = x.to_case ..Lower group_builder.specify "should be able to create a connection via Database.connect" <| - config.with_database url-> - conn = Database.connect (Generic_JDBC_Details.Value url) - conn.should_be_a Generic_JDBC_Connection + handler cp = + IO.println "AAAAA caught p "+cp.payload.to_text + IO.println "AAAAA ==== st" + cp.internal_original_exception.printStackTrace + IO.println "AAAAA ==== ste" + Panic.catch Any handler=handler <| + config.with_database url-> + conn = Database.connect (Generic_JDBC_Details.Value url) + conn.should_be_a Generic_JDBC_Connection group_builder.specify "should be able to get table info" <| with_connection conn-> cleanup_tables conn ["foo", "bar"] <|