Skip to content

Commit

Permalink
Remove some mut / write locks
Browse files Browse the repository at this point in the history
  • Loading branch information
locka99 committed Aug 5, 2021
1 parent 2e26b19 commit 7263c90
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions integration/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,15 @@ fn read_write_read() {

// Read the existing value
{
let mut session = session.write().unwrap();
let session = session.read().unwrap();
let results = session.read(&[node_id.clone().into()]).unwrap();
let value = &results[0];
debug!("value = {:?}", value);
assert_eq!(*value.value.as_ref().unwrap(), Variant::Int32(0))
}

{
let mut session = session.write().unwrap();
let session = session.read().unwrap();
let results = session
.write(&[WriteValue {
node_id: node_id.clone(),
Expand All @@ -430,14 +430,14 @@ fn read_write_read() {
}

{
let mut session = session.write().unwrap();
let session = session.read().unwrap();
let results = session.read(&[node_id.into()]).unwrap();
let value = &results[0];
assert_eq!(*value.value.as_ref().unwrap(), Variant::Int32(1))
}

{
let mut session = session.write().unwrap();
let session = session.read().unwrap();
session.disconnect();
}
},
Expand All @@ -464,7 +464,7 @@ fn subscribe_1000() {
let session = client
.connect_to_endpoint(client_endpoint, identity_token)
.unwrap();
let mut session = session.write().unwrap();
let session = session.read().unwrap();

let start_time = Utc::now();

Expand Down

0 comments on commit 7263c90

Please sign in to comment.