Skip to content

Commit

Permalink
Fix CI - Attempt #2
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Nov 12, 2024
1 parent b48a1f2 commit ed5857c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
/docs/mdbook_bin
/shotover-proxy/build/packages
/some_local_file
/test-helpers/src/connection/kafka/node/node_modules
/test-helpers/src/connection/kafka/node/node_modules
/test-helpers/j4rs
3 changes: 3 additions & 0 deletions test-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ rustls-pemfile = "2.0.0"
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-native-roots"] }
pretty_assertions.workspace = true
serde.workspace = true

[build-dependencies]
j4rs = "0.21.0"
5 changes: 5 additions & 0 deletions test-helpers/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");

j4rs::Jvm::copy_j4rs_libs_under("j4rs").unwrap();
}
7 changes: 6 additions & 1 deletion test-helpers/src/connection/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ impl Jvm {
/// Construct a JVM, downloads the list of deps from the maven repository.
/// Example dep string: "org.slf4j:slf4j-api:1.7.36"
pub(crate) fn new(deps: &[&str]) -> Self {
let jvm = Rc::new(JvmBuilder::new().build().unwrap());
let jvm = Rc::new(
JvmBuilder::new()
.with_base_path("../test-helpers/j4rs")
.build()
.unwrap(),
);

for dep in deps {
jvm.deploy_artifact(&MavenArtifact::from(*dep)).unwrap();
Expand Down

0 comments on commit ed5857c

Please sign in to comment.