Skip to content

Commit

Permalink
Compilation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon18 committed Sep 15, 2023
1 parent 6e14a6f commit 3fb6a0e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/units/rib_unit/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn process_non_route_update() {
assert!(!is_filtered(&runner, update).await);

// And it should NOT be added to the route store
assert_eq!(runner.rib().unwrap().prefixes_count(), 0);
assert_eq!(runner.rib().store().unwrap().prefixes_count(), 0);
}

#[tokio::test]
Expand Down Expand Up @@ -60,7 +60,7 @@ async fn process_update_single_route() {
assert!(!is_filtered(&runner, update).await);

// And it should be added to the route store
assert_eq!(runner.rib().unwrap().prefixes_count(), 1);
assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1);
}

#[tokio::test]
Expand Down Expand Up @@ -92,13 +92,13 @@ async fn process_update_same_route_twice() {
assert!(!is_filtered(&runner, update.clone()).await);

// And it should be added to the route store
assert_eq!(runner.rib().unwrap().prefixes_count(), 1);
assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1);

// When it is processed by this unit again it should not be filtered
assert!(!is_filtered(&runner, update).await);

// And it should NOT be added again to the route store
assert_eq!(runner.rib().unwrap().prefixes_count(), 1);
assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1);
}

#[tokio::test]
Expand Down Expand Up @@ -137,7 +137,7 @@ async fn process_update_two_routes_to_the_same_prefix() {
}

// Then only the one common prefix SHOULD be added to the route store
assert_eq!(runner.rib().unwrap().prefixes_count(), 1);
assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1);

// And at that prefix there should be one RibValue containing two routes
let match_options = MatchOptions {
Expand All @@ -147,7 +147,7 @@ async fn process_update_two_routes_to_the_same_prefix() {
include_more_specifics: true,
};
eprintln!("Querying store match_prefix the first time");
let match_result = runner.rib().as_ref().unwrap().match_prefix(
let match_result = runner.rib().store().unwrap().match_prefix(
&raw_prefix,
&match_options,
&epoch::pin(),
Expand Down Expand Up @@ -175,7 +175,7 @@ async fn process_update_two_routes_to_the_same_prefix() {
// see that the routes HashSet Arc strong reference count increases from 2 to 3 while the inner items of the
// HashSet still have a strong reference count of 1.
eprintln!("Querying store match_prefix the second time");
let match_result2 = runner.rib().as_ref().unwrap().match_prefix(
let match_result2 = runner.rib().store().unwrap().match_prefix(
&raw_prefix,
&match_options,
&epoch::pin(),
Expand Down Expand Up @@ -242,7 +242,7 @@ async fn process_update_two_routes_to_different_prefixes() {
}

// Then two separate prefixes SHOULD be added to the route store
assert_eq!(runner.rib().unwrap().prefixes_count(), 2);
assert_eq!(runner.rib().store().unwrap().prefixes_count(), 2);

// And at that prefix there should be two RibValues
let match_options = MatchOptions {
Expand All @@ -256,7 +256,7 @@ async fn process_update_two_routes_to_different_prefixes() {
let match_result =
runner
.rib()
.as_ref()
.store()
.unwrap()
.match_prefix(&prefix, &match_options, &epoch::pin());
assert!(matches!(match_result.match_type, MatchType::ExactMatch));
Expand Down

0 comments on commit 3fb6a0e

Please sign in to comment.