diff --git a/README.md b/README.md index 1860ed8..3f19a28 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ __Version:__ 0.5.0 [![CircleCI](https://circleci.com/gh/census-instrumentation/opencensus-erlang.svg?style=svg)](https://circleci.com/gh/census-instrumentation/opencensus-erlang) [![codecov](https://codecov.io/gh/census-instrumentation/opencensus-erlang/branch/master/graph/badge.svg)](https://codecov.io/gh/census-instrumentation/opencensus-erlang) -[![Hex.pm](https://img.shields.io/hexpm/v//opencensus.svg?maxAge=2592000)](https://hex.pm/packages/opencensus) +[![Hex.pm](https://img.shields.io/hexpm/v/opencensus.svg?maxAge=2592000)](https://hex.pm/packages/opencensus) [![Hex.pm](https://img.shields.io/hexpm/dt/opencensus.svg?maxAge=2592000)](https://hex.pm/packages/opencensus) diff --git a/rebar.config b/rebar.config index b88a680..58fbbfd 100644 --- a/rebar.config +++ b/rebar.config @@ -8,9 +8,8 @@ {counters, "~> 0.2.1"}]}. {project_plugins, [covertool, - rebar3_lint]}. - -{plugins, [rebar3_proper]}. + rebar3_lint, + rebar3_proper]}. {profiles, [ {test, [{erl_opts, [nowarn_export_all]}, @@ -32,7 +31,7 @@ {cover_enabled, true}. {cover_opts, [verbose]}. -{cover_excl_mods, [oc_trace_pb, oc_trace_config_pb, oc_span_transform, oc_stat_transform]}. +{cover_excl_mods, [oc_span_transform, oc_stat_transform]}. {cover_export_enabled, true}. {covertool, [{coverdata_files, ["ct.coverdata"]}]}. diff --git a/test/oc_sampler_period_or_count_prop_SUITE.erl b/test/oc_sampler_period_or_count_prop_SUITE.erl new file mode 100644 index 0000000..e71e4db --- /dev/null +++ b/test/oc_sampler_period_or_count_prop_SUITE.erl @@ -0,0 +1,41 @@ +%%%------------------------------------------------------------------------ +%% Copyright 2019, OpenCensus Authors +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. +%% +%% @doc +%% @end +%%%----------------------------------------------------------------------- +-module(oc_sampler_period_or_count_prop_SUITE). + +-compile(export_all). + +-include_lib("common_test/include/ct.hrl"). + +all() -> + [compare_desired_sampling_result_with_factual, validate_sampling_by_checking_counters]. + +init_per_suite(Config) -> + [{property_test_tool, proper} | Config]. + +end_per_suite(_Config) -> + ok. + +compare_desired_sampling_result_with_factual(Config) -> + ct_property_test:quickcheck( + prop_period_or_count:prop_compare_desired_sampling_result_with_factual(), + Config). + +validate_sampling_by_checking_counters(Config) -> + ct_property_test:quickcheck( + prop_period_or_count:prop_validate_sampling_by_checking_counters(), + Config). diff --git a/test/property_test/see_pr_2145 b/test/property_test/see_pr_2145 new file mode 100644 index 0000000..e69de29