Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

alrsorokin
Copy link

No description provided.

@alrsorokin alrsorokin marked this pull request as ready for review January 14, 2025 18:29

Запустите тесты с использованием переменной RUST_TEST_THREADS=1:
```sh
RUST_TEST_THREADS=1 cargo test
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может быть сделать синхронизацию через создание lock файла в системе? Потому что если мы заставляем ограничить треды, мы убиваем производительность для всех. А не все тесты чувствительны к гонкам и некоторые могут спокойно запускаться парралелльно.

Comment on lines +62 to +89
```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);
}
}
```
Copy link
Collaborator

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]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо уносить в отдельный репо

@alrsorokin
Copy link
Author

проект перенес https://github.com/picodata/picotest

@alrsorokin alrsorokin closed this Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants