Skip to content

Commit

Permalink
test: make t/plugin/skywalking.t stable (#5170)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacewander authored Oct 4, 2021
1 parent 34df010 commit aa375ab
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions t/plugin/skywalking.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
# limitations under the License.
#

BEGIN {
if ($ENV{TEST_NGINX_CHECK_LEAK}) {
$SkipReason = "unavailable for the hup tests";

} else {
$ENV{TEST_NGINX_USE_HUP} = 1;
undef $ENV{TEST_NGINX_USE_STAP};
}
}

use t::APISIX 'no_plan';

add_block_preprocessor(sub {
Expand All @@ -38,6 +28,10 @@ _EOC_
$block->set_value("extra_yaml_config", $extra_yaml_config);

my $extra_init_by_lua = <<_EOC_;
-- reduce default report interval
local client = require("skywalking.client")
client.backendTimerDelay = 0.5
local sw_tracer = require("skywalking.tracer")
local inject = function(mod, name)
local old_f = mod[name]
Expand Down Expand Up @@ -129,9 +123,13 @@ GET /opentracing
opentracing
--- no_error_log
[error]
--- error_log
segments reported
--- wait: 4
--- grep_error_log eval
qr/skywalking run \w+/
--- grep_error_log_out
skywalking run start
skywalking run finish
skywalking run prepareForReport
--- wait: 1
Expand Down Expand Up @@ -198,8 +196,9 @@ passed
GET /opentracing
--- response_body
opentracing
--- error_log
miss sampling, ignore
--- grep_error_log eval
qr/skywalking run \w+/
--- grep_error_log_out
--- no_error_log
[error]
Expand Down Expand Up @@ -332,7 +331,13 @@ GET /opentracing
opentracing
--- no_error_log
[error]
--- wait: 4
--- grep_error_log eval
qr/skywalking run \w+/
--- grep_error_log_out
skywalking run start
skywalking run finish
skywalking run prepareForReport
--- wait: 1
Expand Down

0 comments on commit aa375ab

Please sign in to comment.