diff --git a/test/test_controlplane.jl b/test/test_controlplane.jl index db61b572..6c43bd91 100644 --- a/test/test_controlplane.jl +++ b/test/test_controlplane.jl @@ -1,4 +1,4 @@ -@testitem "Control Protocol" tags=[:controlplane] begin +@testitem "Control Protocols" tags=[:controlplane] begin using QuantumSavory using QuantumSavory.ProtocolZoo @@ -57,4 +57,38 @@ for i in 1:length(consumer.log) @test consumer.log[i][3] ≈ 1.0 end +#### Connection less controller + +net = RegisterNet(graph, [Register(regsize) for i in 1:8]) +sim = get_time_tracker(net) + +# controller +controller = CLController(sim, net, 6) +@process controller() + +# RequestGenerator for the user pair (1,8) +req_gen = RequestGenerator(sim, net, 1, 8, 6) +@process req_gen() + +# consumer +consumer = EntanglementConsumer(sim, net, 1, 8) +@process consumer() + +# entanglement and request trackers, cutoff protocol +for v in 1:8 + etracker = EntanglementTracker(sim, net, v) + rtracker = RequestTracker(sim, net, v) + cutoff = CutoffProt(sim, net, v) + @process etracker() + @process rtracker() + @process cutoff() +end + +run(sim, 1000) + +for i in 1:length(consumer.log) + @test consumer.log[i][2] ≈ 1.0 + @test consumer.log[i][3] ≈ 1.0 +end + end \ No newline at end of file