File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -180,10 +180,12 @@ Then visit http://localhost:8080/metrics to see the exported metrics.
180180
181181A long-running test simulates RBAC, ABAC, and ReBAC authorization patterns for testing with Prometheus and Grafana.
182182
183+ **Note**: This test is excluded from normal CI runs to avoid timeouts. It must be run manually with the `longrunning` build tag.
184+
183185# ## Usage
184186
185187` ` ` bash
186- go test -v -run TestLongRunning -timeout 0
188+ go test -v -tags longrunning - run TestLongRunning -timeout 0
187189` ` `
188190
189191The test generates ~50-150 requests/second and exposes metrics on `http://localhost:8080/metrics`. Press Ctrl+C to stop.
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
77github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
88github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8 =
99github.com/google/go-cmp v0.7.0 /go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU =
10+ github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo =
11+ github.com/klauspost/compress v1.18.0 /go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ =
1012github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE =
1113github.com/kr/pretty v0.3.1 /go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk =
1214github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY =
Original file line number Diff line number Diff line change 1+ //go:build longrunning
2+ // +build longrunning
3+
14// Copyright 2026 The casbin Authors. All Rights Reserved.
25//
36// Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,8 +32,8 @@ import (
2932// This test is designed to run continuously for testing Prometheus and Grafana integration.
3033// It generates realistic traffic patterns based on classic RBAC, ABAC, and ReBAC scenarios.
3134//
32- // To run this test:
33- // go test -v -run TestLongRunning -timeout 0
35+ // To run this test manually :
36+ // go test -v -tags longrunning - run TestLongRunning -timeout 0
3437//
3538// The test will:
3639// - Start a Prometheus metrics endpoint on http://localhost:8080/metrics
@@ -40,10 +43,6 @@ import (
4043//
4144// Press Ctrl+C to stop the test.
4245func TestLongRunning (t * testing.T ) {
43- // Skip in normal test runs
44- if testing .Short () {
45- t .Skip ("Skipping long-running test in short mode" )
46- }
4746
4847 // Create a custom registry for this test
4948 registry := prometheus .NewRegistry ()
You can’t perform that action at this time.
0 commit comments