Migrate composd to odrefresh-in-vm
Replace startTestCompile with what was startAsyncOdrefresh, and
migrate startStagedApexCompile to work the same way. That means
both of our scheduled jobs will now be using the new mechanism.
Remove some of the now redundant code.
Remove tests that were explicitly running the deprecated form.
Bug: 205750213
Bug: 210998077
Test: atest ComposHostTestCases
Test: Manually trigger both scheduled jobs, observe success
Change-Id: Ie9df53045a852a37330156c76ac25c74db907b46
diff --git a/compos/composd_cmd/composd_cmd.rs b/compos/composd_cmd/composd_cmd.rs
index 41e2b1a..546c4af 100644
--- a/compos/composd_cmd/composd_cmd.rs
+++ b/compos/composd_cmd/composd_cmd.rs
@@ -38,7 +38,7 @@
.index(1)
.takes_value(true)
.required(true)
- .possible_values(&["staged-apex-compile", "forced-compile-test", "async-odrefresh"]),
+ .possible_values(&["staged-apex-compile", "test-compile"]),
);
let args = app.get_matches();
let command = args.value_of("command").unwrap();
@@ -47,8 +47,7 @@
match command {
"staged-apex-compile" => run_staged_apex_compile()?,
- "forced-compile-test" => run_forced_compile_for_test()?,
- "async-odrefresh" => run_async_odrefresh_for_test()?,
+ "test-compile" => run_test_compile()?,
_ => panic!("Unexpected command {}", command),
}
@@ -109,14 +108,10 @@
run_async_compilation(|service, callback| service.startStagedApexCompile(callback))
}
-fn run_forced_compile_for_test() -> Result<()> {
+fn run_test_compile() -> Result<()> {
run_async_compilation(|service, callback| service.startTestCompile(callback))
}
-fn run_async_odrefresh_for_test() -> Result<()> {
- run_async_compilation(|service, callback| service.startAsyncOdrefresh(callback))
-}
-
fn run_async_compilation<F>(start_compile_fn: F) -> Result<()>
where
F: FnOnce(