// Test `watch_annotations` returns current annotations on client's first request.
Test `watch_annotations` returns current annotations on client's first request.
Test ` watch_annotations ` returns current annotations on client ' s first request .
async fn watch_annotations_immediate_return() -> Result<(), anyhow::Error> {
        let holder = Arc::new(Mutex::new(AnnotationHolder::new()));
        let proxy = spawn_annotation_controller_handler(holder.clone());
        let _ = proxy.update_annotations(
            &mut vec![felement::Annotation {
                key: make_annotation_key("NAMESPACE", "id1"),
                value: make_annotation_text("original1"),
            }]
            .iter_mut(),
            &mut vec![].iter_mut(),
        );
        let annotations = proxy.watch_annotations().await?.unwrap();
        assert_eq!(annotations.len(), 1);
        Ok(())
    }
async fn watch_annotations_immediate_return ( ) -> Result < ( ) , anyhow :: Error > { let holder = Arc :: new ( Mutex :: new ( AnnotationHolder :: new ( ) ) ) ; let proxy = spawn_annotation_controller_handler ( holder . clone ( ) ) ; let _ = proxy . update_annotations ( & mut vec ! [ felement Annotation { key make_annotation_key ( " " " " ) value make_annotation_text ( " " ) } ] . iter_mut ( ) , & mut vec ! [ ] . iter_mut ( ) , ) ; let annotations = proxy . watch_annotations ( ) . await ? . unwrap ( ) ; assert_eq ! ( annotations len ( ) 1 ) ; Ok ( ( ) ) }
Test `watch_annotations` returns current annotations on client's first request.
Test ` watch_annotations ` returns current annotations on client ' s first request .