File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner/it Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,10 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception {
137137 IntegerSubject subject =
138138 assertWithMessage ("Metric " + metric + " returned data." )
139139 .that (response .getTimeSeriesCount ());
140- if (isProduction ()) {
141- subject .isEqualTo (0 );
142- } else {
140+ if (isAfeMetricEnabled ()) {
143141 subject .isGreaterThan (0 );
142+ } else {
143+ subject .isEqualTo (0 );
144144 }
145145
146146 } else {
@@ -151,9 +151,8 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception {
151151 }
152152 }
153153
154- private boolean isProduction () {
154+ private boolean isAfeMetricEnabled () {
155155 String jobType = System .getenv ("JOB_TYPE" );
156- return !Strings .isNullOrEmpty (jobType )
157- && !(jobType .contains ("devel" ) || jobType .contains ("staging" ));
156+ return !Strings .isNullOrEmpty (jobType ) && jobType .contains ("devel" );
158157 }
159158}
You can’t perform that action at this time.
0 commit comments