File tree Expand file tree Collapse file tree 5 files changed +1
-29
lines changed
zipkin-server/src/test/java/zipkin/server Expand file tree Collapse file tree 5 files changed +1
-29
lines changed Original file line number Diff line number Diff line change 13
13
*/
14
14
package zipkin .server ;
15
15
16
- import io .prometheus .client .CollectorRegistry ;
17
16
import java .io .IOException ;
18
17
import okhttp3 .OkHttpClient ;
19
18
import okhttp3 .Request ;
20
19
import okhttp3 .RequestBody ;
21
20
import okhttp3 .Response ;
22
- import org .junit .Before ;
23
21
import org .junit .Test ;
24
22
import org .junit .runner .RunWith ;
25
23
import org .springframework .boot .context .embedded .LocalServerPort ;
@@ -49,9 +47,7 @@ public class ZipkinServerCORSTest {
49
47
@ LocalServerPort int zipkinPort ;
50
48
OkHttpClient client = new OkHttpClient .Builder ().followRedirects (false ).build ();
51
49
52
- @ Before public void init () throws IOException {
53
- // prevent "brian's bomb" https://github.com/openzipkin/zipkin/issues/1811
54
- CollectorRegistry .defaultRegistry .clear ();
50
+ @ Test public void shouldAllowConfiguredOrigin () throws IOException {
55
51
shouldAllowConfiguredOrigin (getTracesFromOrigin (ALLOWED_ORIGIN ));
56
52
shouldAllowConfiguredOrigin (postSpansFromOrigin (ALLOWED_ORIGIN ));
57
53
}
Original file line number Diff line number Diff line change 14
14
package zipkin .server ;
15
15
16
16
import com .github .kristofa .brave .Brave ;
17
- import io .prometheus .client .CollectorRegistry ;
18
17
import org .junit .After ;
19
- import org .junit .Before ;
20
18
import org .junit .Test ;
21
19
import org .springframework .beans .factory .NoSuchBeanDefinitionException ;
22
20
import org .springframework .boot .actuate .health .HealthAggregator ;
39
37
public class ZipkinServerConfigurationTest {
40
38
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext ();
41
39
42
- @ Before public void init () {
43
- // prevent "brian's bomb" https://github.com/openzipkin/zipkin/issues/1811
44
- CollectorRegistry .defaultRegistry .clear ();
45
- }
46
-
47
40
@ After public void close () {
48
41
context .close ();
49
42
}
Original file line number Diff line number Diff line change 13
13
*/
14
14
package zipkin .server ;
15
15
16
- import io .prometheus .client .CollectorRegistry ;
17
16
import okhttp3 .OkHttpClient ;
18
17
import okhttp3 .Request ;
19
18
import okhttp3 .RequestBody ;
20
19
import okhttp3 .Response ;
21
- import org .junit .Before ;
22
20
import org .junit .Test ;
23
21
import org .junit .runner .RunWith ;
24
22
import org .springframework .boot .context .embedded .LocalServerPort ;
@@ -45,11 +43,6 @@ public class ZipkinServerHttpCollectorDisabledTest {
45
43
@ LocalServerPort int zipkinPort ;
46
44
OkHttpClient client = new OkHttpClient .Builder ().followRedirects (false ).build ();
47
45
48
- @ Before public void init () {
49
- // prevent "brian's bomb" https://github.com/openzipkin/zipkin/issues/1811
50
- CollectorRegistry .defaultRegistry .clear ();
51
- }
52
-
53
46
@ Test public void httpCollectorEndpointReturns405 () throws Exception {
54
47
Response response = client .newCall (new Request .Builder ()
55
48
.url ("http://localhost:" + zipkinPort + "/api/v2/spans" )
Original file line number Diff line number Diff line change 14
14
package zipkin .server ;
15
15
16
16
import com .jayway .jsonpath .JsonPath ;
17
- import io .prometheus .client .CollectorRegistry ;
18
17
import java .io .IOException ;
19
18
import java .util .List ;
20
19
import okhttp3 .MediaType ;
@@ -64,8 +63,6 @@ public class ZipkinServerIntegrationTest {
64
63
OkHttpClient client = new OkHttpClient .Builder ().followRedirects (false ).build ();
65
64
66
65
@ Before public void init () {
67
- // prevent "brian's bomb" https://github.com/openzipkin/zipkin/issues/1811
68
- CollectorRegistry .defaultRegistry .clear ();
69
66
storage .clear ();
70
67
metrics .forTransport ("http" ).reset ();
71
68
}
Original file line number Diff line number Diff line change 13
13
*/
14
14
package zipkin .server ;
15
15
16
- import io .prometheus .client .CollectorRegistry ;
17
16
import java .io .IOException ;
18
17
import okhttp3 .OkHttpClient ;
19
18
import okhttp3 .Request ;
20
19
import okhttp3 .Response ;
21
- import org .junit .Before ;
22
20
import org .junit .Test ;
23
21
import org .junit .runner .RunWith ;
24
22
import org .springframework .boot .context .embedded .LocalServerPort ;
@@ -45,11 +43,6 @@ public class ZipkinServerQueryDisabledTest {
45
43
@ LocalServerPort int zipkinPort ;
46
44
OkHttpClient client = new OkHttpClient .Builder ().followRedirects (false ).build ();
47
45
48
- @ Before public void init () {
49
- // prevent "brian's bomb" https://github.com/openzipkin/zipkin/issues/1811
50
- CollectorRegistry .defaultRegistry .clear ();
51
- }
52
-
53
46
@ Test public void queryRelatedEndpoints404 () throws Exception {
54
47
assertThat (get ("/api/v1/traces" ).code ()).isEqualTo (404 );
55
48
assertThat (get ("/api/v2/traces" ).code ()).isEqualTo (404 );
You can’t perform that action at this time.
0 commit comments