-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picotest: library for testing picodata plugins #33
Conversation
|
||
Запустите тесты с использованием переменной RUST_TEST_THREADS=1: | ||
```sh | ||
RUST_TEST_THREADS=1 cargo test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может быть сделать синхронизацию через создание lock файла в системе? Потому что если мы заставляем ограничить треды, мы убиваем производительность для всех. А не все тесты чувствительны к гонкам и некоторые могут спокойно запускаться парралелльно.
```rust | ||
use picotest::picotest; | ||
|
||
#[picotest] | ||
mod test_mod { | ||
#[fixture] | ||
fn foo() -> String { | ||
"foo".to_string() | ||
} | ||
|
||
#[fixture] | ||
fn bar() -> String { | ||
"bar".to_string() | ||
} | ||
|
||
fn test_foo(foo: String) { | ||
assert_eq!(foo, "foo".to_string()); | ||
} | ||
|
||
fn test_bar(bar: String) { | ||
assert_eq!(bar, "bar".to_string()); | ||
} | ||
|
||
fn test_foo_bar(foo: String, bar: String) { | ||
assert_ne!(foo, bar); | ||
} | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мне кажется пример теста надо делать сразу в шаблонном проекте, но только не такой синтетический, а с каким-то реальным запросом в поднятый кластер. Но возможно стоит это делать в рамках тикета #9
@@ -0,0 +1,10 @@ | |||
[workspace] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Надо уносить в отдельный репо
проект перенес |
No description provided.