rename variable. investiage test failure

This commit is contained in:
Alek Westover
2023-07-26 16:51:58 -04:00
parent f64fb4eadc
commit f14dc1abbb
3 changed files with 19 additions and 8 deletions

View File

@@ -197,7 +197,7 @@ fn main() -> Result<()> {
state_changed: Condvar::new(),
ext_remote_storage,
ext_remote_paths: OnceLock::new(),
already_downloaded_extensions: Mutex::new(HashSet::new()),
started_to_download_extensions: Mutex::new(HashSet::new()),
library_index: OnceLock::new(),
build_tag,
};

View File

@@ -59,7 +59,7 @@ pub struct ComputeNode {
// (key: extension name, value: path to extension archive in remote storage)
pub ext_remote_paths: OnceLock<HashMap<String, RemotePath>>,
pub library_index: OnceLock<HashMap<String, String>>,
pub already_downloaded_extensions: Mutex<HashSet<String>>,
pub started_to_download_extensions: Mutex<HashSet<String>>,
pub build_tag: String,
}
@@ -778,16 +778,18 @@ LIMIT 100",
}
{
let mut already_downloaded_extensions =
self.already_downloaded_extensions.lock().expect("bad lock");
if already_downloaded_extensions.contains(&real_ext_name) {
let mut started_to_download_extensions = self
.started_to_download_extensions
.lock()
.expect("bad lock");
if started_to_download_extensions.contains(&real_ext_name) {
info!(
"extension {:?} already exists, skipping download",
&ext_name
);
return Ok(());
} else {
already_downloaded_extensions.insert(real_ext_name.clone());
started_to_download_extensions.insert(real_ext_name.clone());
}
}
extension_server::download_extension(

View File

@@ -176,9 +176,18 @@ def test_remote_library(
log.info(f"error loading anon library: {err}")
raise AssertionError("unexpected error loading anon library") from err
# TODO test library which name is different from extension name
# test library which name is different from extension name
# this fails on my computer because I' missing a dependency
# however, it does successfully download the postgis archive
if remote_storage_kind == RemoteStorageKind.REAL_S3:
cur.execute("LOAD 'postgis_topology-3'")
try:
cur.execute("LOAD 'postgis_topology-3'")
except Exception as err:
log.info("error loading postgis_topology-3")
assert (
"libproj.so.19: cannot open shared object file: No such file or directory"
in str(err)
), "unexpected error loading postgis_topology-3"
cleanup_files = add_pgdir_prefix(
pg_version,