feat: release Dever 0.1.5 with direct workers and long transactions
This commit is contained in:
1 parent
89629c2197
commit
a900d7e8db
153 files changed
+3676
-3708
No files matched your search
@@ -340,6 +340,18 @@ inspect() (okay: Bool) { okay = model.count() == 0 }
|
||||
body: "{}",
|
||||
};
|
||||
|
||||
const ENCODING_COMMIT: Fixture<'static> = Fixture {
|
||||
model: ITEM,
|
||||
app: r#"transaction exercise(denominator: Float) (value: Float) {
|
||||
removed = model.delete({ where = name == "encoding commit" })
|
||||
saved = model.create({ name = "encoding commit" })
|
||||
value = 1.0 / denominator
|
||||
}
|
||||
inspect() (okay: Bool) { okay = model.count() == 1 }
|
||||
"#,
|
||||
body: r#"{"denominator":0}"#,
|
||||
};
|
||||
|
||||
const ENCODING_ROLLBACK: Fixture<'static> = Fixture {
|
||||
model: ITEM,
|
||||
app: r#"exercise(denominator: Float) (value: Float) {
|
||||
@@ -847,6 +859,37 @@ validate(first: model.user.User, second: model.user.User) (okay: Bool) { okay =
|
||||
directory
|
||||
}
|
||||
|
||||
fn encoding_commit_sequence(setting: &str, timeout: Duration) {
|
||||
let directory = configured_directory(setting);
|
||||
let sources = fixture_sources_with_api(
|
||||
&ENCODING_COMMIT,
|
||||
"long cmd exercise = app.exercise\ncmd inspect = app.inspect",
|
||||
);
|
||||
for (command, body, fault) in [
|
||||
("store.item.exercise", ENCODING_COMMIT.body, Some(3)),
|
||||
("store.item.inspect", "{}", None),
|
||||
] {
|
||||
let ir = entry_ir(&sources, fault);
|
||||
assert_output(
|
||||
llvm_module::execute_in(
|
||||
&directory,
|
||||
&ir,
|
||||
"encoding failure preserves committed row",
|
||||
64,
|
||||
timeout,
|
||||
&[command, body],
|
||||
),
|
||||
fault.is_some(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "requires explicit runtime archive; committed long-entry SQLite stages"]
|
||||
fn sqlite_long_command_preserves_commit_on_encoding_failure() {
|
||||
encoding_commit_sequence(SETTING, Duration::from_secs(20));
|
||||
}
|
||||
|
||||
fn constraint_sequence(setting: &str, timeout: Duration) {
|
||||
let directory = configured_directory(setting);
|
||||
let sources = fixture_sources_with_api(
|
||||
|
||||
Reference in new issue
Block a user