Skip to content

Commit

Permalink
Handle rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesmoon committed Oct 18, 2023
1 parent 70f55d8 commit 31354f5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/beacon-api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ config = mPulseAPI.getBeaconConfig(beaconKey, "mPulseAPIDemo.net")
@test config isa Dict
@test haskey(config, "site_domain")
@test config["site_domain"] == "mPulseAPIDemo.net"
@test haskey(config, "h.cr")
@test haskey(config, "h.d")
@test haskey(config, "h.key")
@test haskey(config, "h.t")

t_end = Int(datetime2unix(now())*1000)
@test mPulseAPI.sendBeacon(config, Dict("PageGroup" => "mPulseAPI Test", "tDone" => t_end - t_start, "Conversion" => 1, "ResourceTimer" => 500, "Url" => "https://github.com/akamai/mPulseAPI.jl/"))
if !haskey(config, "rate_limited")
@test haskey(config, "h.cr")
@test haskey(config, "h.d")
@test haskey(config, "h.key")
@test haskey(config, "h.t")

t_end = Int(datetime2unix(now())*1000)
@test mPulseAPI.sendBeacon(config, Dict("PageGroup" => "mPulseAPI Test", "tDone" => t_end - t_start, "Conversion" => 1, "ResourceTimer" => 500, "Url" => "https://github.com/akamai/mPulseAPI.jl/"))
end

config2 = mPulseAPI.getBeaconConfig(beaconKey, "mPulseAPIDemo.net")

Expand Down

0 comments on commit 31354f5

Please sign in to comment.