Commit graph

11 commits

Author SHA1 Message Date
coredns[bot]
ae0431e4da auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-12 10:32:17 +00:00
Ondřej Benkovský
70b51a73d3
add configurable log level to errors plugin (#4718)
Automatically submitted.
2021-07-09 14:23:02 +00:00
Miek Gieben
c840caf1ef
Speed up testing (#4239)
* Speed up testing

* make notification run in the background, this recudes the test_readme
time from 18s to 0.10s
* reduce time for zone reload

* TestServeDNSConcurrent remove entirely. This took a whopping 58s for
  ... ? A few minutes staring didn't reveal wth it is actually testing.
  Making values smaller revealed race conditions in the tests. Remove
  entirely.

* Move many interval values to variables so we can reset them to short
  values for the tests.

* test_large_axfr: make the zone smaller. The number used 64K has no
  rational, make it 64/10 to speed up.
* TestProxyThreeWay: use client with shorter timeout

A few random tidbits in other tests.

Total time saved: 177s (almost 3m) - which makes it worthwhile again to
run the test locally:

this branch:

~~~
ok  	github.com/coredns/coredns/test	10.437s
cd plugin; time go t ./...
5,51s user 7,51s system 11,15s elapsed 744%CPU (
~~~

master:

~~~
ok  	github.com/coredns/coredns/test	35.252s
cd plugin; time go t ./...
157,64s user 15,39s system 50,05s elapsed 345%CPU ()
~~~
tests/ -25s
plugins/ -40s

This brings the total on 20s, and another 10s can be saved by fixing
dnstapio. Moving this to 5s would be even better, but 10s is also nice.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Also 0.01

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-10-30 10:27:04 +01:00
Ruslan Drozhdzh
18d305f4b3 plugin/errors: remove cLogger and eLogger (#2657) 2019-03-07 20:14:09 +00:00
Ye Ben
0eff7f3797 some typo fix (#2512)
Signed-off-by: yeya24 <ben.ye@daocloud.io>
2019-01-29 10:21:19 -05:00
Ruslan Drozhdzh
7b25d18019 plugin/errors: 'consolidate' option (#2192)
- see more details at https://github.com/infobloxopen/coredns-plugin-errors/pull/3
2018-10-27 15:37:09 +01:00
Miek Gieben
874a998697 plugin/errors: remove panic/recover (#1777)
Remove panic/recover and also use pkg/log to print the error. This
brings some consistency into the logging.

Fixes #1776
2018-05-09 19:04:46 -07:00
Miek Gieben
0930eb8beb
all: fix plugin import ordering (#1717)
Got a bit messed up with stb lib "context" usage.
2018-04-22 08:34:35 +01:00
Miek Gieben
8722336fff
global: move to context (#1699)
* global: move to context

Move from golang.org/x/net/context to std lib's context.

Change done with:

for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done
for i in **/*.go; do goimports -w $i; done

* drop from dns.pb.go as well
2018-04-20 11:01:06 +01:00
Miek Gieben
284061eee7 pkg: add dnstest (#1098)
Add a full test server impl in this new package + tests. Move
dnsrecorder into this package as well and finish up the commented out
tests that were left in the old dnsrecorder package.

Update all callers and tests.
2017-09-21 15:15:47 +01:00
Miek Gieben
d8714e64e4 Remove the word middleware (#1067)
* Rename middleware to plugin

first pass; mostly used 'sed', few spots where I manually changed
text.

This still builds a coredns binary.

* fmt error

* Rename AddMiddleware to AddPlugin

* Readd AddMiddleware to remain backwards compat
2017-09-14 09:36:06 +01:00
Renamed from middleware/errors/errors_test.go (Browse further)