fix one test

though i think we want to change it to give None instead of 502
This commit is contained in:
Bryan Stitt 2023-10-13 20:08:39 -07:00
parent 18e3795863
commit e414fc0ac0

@ -81,14 +81,17 @@ async fn it_starts_and_stops() {
let mut proxy_result = None;
for _ in 0..10 {
proxy_result = proxy_provider
// TODO: we currently give a 502 here when we should give a `None`
if let Ok(x) = proxy_provider
.request::<_, Option<ArcBlock>>("eth_getBlockByNumber", ("latest", false))
.await
.unwrap();
{
proxy_result = x;
if let Some(ref proxy_result) = proxy_result {
if proxy_result.number == Some(second_block_num) {
break;
if let Some(ref proxy_result) = proxy_result {
if proxy_result.number == Some(second_block_num) {
break;
}
}
}
@ -97,7 +100,7 @@ async fn it_starts_and_stops() {
sleep(Duration::from_millis(100)).await;
}
assert_eq!(anvil_result, proxy_result.unwrap());
assert_eq!(Some(anvil_result), proxy_result);
// this won't do anything since stats aren't tracked when there isn't a db
let flushed = x.flush_stats_and_wait().await.unwrap();