Enable env log in peer tests
This commit is contained in:
parent
c0a434fe27
commit
a14b626927
3 changed files with 11 additions and 0 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -3826,6 +3826,8 @@ dependencies = [
|
||||||
"base64 0.13.0",
|
"base64 0.13.0",
|
||||||
"clock",
|
"clock",
|
||||||
"collections",
|
"collections",
|
||||||
|
"ctor",
|
||||||
|
"env_logger",
|
||||||
"futures",
|
"futures",
|
||||||
"gpui",
|
"gpui",
|
||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
|
|
|
@ -38,3 +38,5 @@ collections = { path = "../collections", features = ["test-support"] }
|
||||||
gpui = { path = "../gpui", features = ["test-support"] }
|
gpui = { path = "../gpui", features = ["test-support"] }
|
||||||
smol = "1.2.5"
|
smol = "1.2.5"
|
||||||
tempdir = "0.3.7"
|
tempdir = "0.3.7"
|
||||||
|
ctor = "0.1"
|
||||||
|
env_logger = "0.9"
|
||||||
|
|
|
@ -499,6 +499,13 @@ mod tests {
|
||||||
use async_tungstenite::tungstenite::Message as WebSocketMessage;
|
use async_tungstenite::tungstenite::Message as WebSocketMessage;
|
||||||
use gpui::TestAppContext;
|
use gpui::TestAppContext;
|
||||||
|
|
||||||
|
#[ctor::ctor]
|
||||||
|
fn init_logger() {
|
||||||
|
if std::env::var("RUST_LOG").is_ok() {
|
||||||
|
env_logger::init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[gpui::test(iterations = 50)]
|
#[gpui::test(iterations = 50)]
|
||||||
async fn test_request_response(cx: &mut TestAppContext) {
|
async fn test_request_response(cx: &mut TestAppContext) {
|
||||||
let executor = cx.foreground();
|
let executor = cx.foreground();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue