Skip to content

Commit 0d112aa

Browse files
authored
Merge pull request #373 from bugsnag/main
Sync next & main
2 parents 8bc2d49 + 97634be commit 0d112aa

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## TDB
1+
## 1.13.0 (2025-04-24)
22

33
### Changes
44

bugsnag-android-performance/src/main/kotlin/com/bugsnag/android/performance/BugsnagPerformance.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import java.net.URL
3333
* @see [start]
3434
*/
3535
public object BugsnagPerformance {
36-
public const val VERSION: String = "1.12.0"
36+
public const val VERSION: String = "1.13.0"
3737

3838
@get:JvmName("getInstrumentedAppState\$internal")
3939
internal val instrumentedAppState = InstrumentedAppState()

bugsnag-android-performance/src/test/java/com/bugsnag/android/performance/ContextAwareScheduledThreadPoolExecutorTest.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import com.bugsnag.android.performance.internal.SpanFactory
55
import com.bugsnag.android.performance.test.CollectingSpanProcessor
66
import org.junit.Assert.assertEquals
77
import org.junit.Assert.assertSame
8+
import org.junit.Assert.assertTrue
89
import org.junit.Before
910
import org.junit.Test
1011
import org.junit.runner.RunWith
@@ -13,6 +14,7 @@ import org.robolectric.annotation.Config
1314
import org.robolectric.shadows.ShadowPausedSystemClock
1415
import java.lang.Thread.sleep
1516
import java.util.concurrent.Callable
17+
import java.util.concurrent.CountDownLatch
1618
import java.util.concurrent.TimeUnit
1719

1820
@RunWith(RobolectricTestRunner::class)
@@ -79,12 +81,14 @@ class ContextAwareScheduledThreadPoolExecutorTest {
7981
fun scheduleWithFixedDelay() {
8082
val scheduledExecutor = ContextAwareScheduledThreadPoolExecutor(1)
8183
var startTime = SystemClock.elapsedRealtime()
84+
val countDownLatch = CountDownLatch(2)
8285
spanFactory.createCustomSpan("parent").use {
8386
scheduledExecutor.scheduleWithFixedDelay(
8487
{
8588
startTime += 100L
8689
SystemClock.setCurrentTimeMillis(startTime)
8790
spanFactory.createCustomSpan("child").end()
91+
countDownLatch.countDown()
8892
},
8993
0L,
9094
100L,
@@ -95,8 +99,7 @@ class ContextAwareScheduledThreadPoolExecutorTest {
9599
sleep(75L)
96100
}
97101

98-
// allow task to run once more
99-
sleep(75L)
102+
assertTrue(countDownLatch.await(500L, TimeUnit.MILLISECONDS))
100103
scheduledExecutor.shutdownNow()
101104

102105
val collectedSpans = spanProcessor.toList()
@@ -109,12 +112,14 @@ class ContextAwareScheduledThreadPoolExecutorTest {
109112
fun scheduleAtFixedRate() {
110113
val scheduledExecutor = ContextAwareScheduledThreadPoolExecutor(1)
111114
var startTime = SystemClock.elapsedRealtime()
115+
val countDownLatch = CountDownLatch(2)
112116
spanFactory.createCustomSpan("parent").use {
113117
scheduledExecutor.scheduleAtFixedRate(
114118
{
115119
startTime += 100L
116120
SystemClock.setCurrentTimeMillis(startTime)
117121
spanFactory.createCustomSpan("child").end()
122+
countDownLatch.countDown()
118123
},
119124
0L,
120125
100L,
@@ -125,8 +130,7 @@ class ContextAwareScheduledThreadPoolExecutorTest {
125130
sleep(75L)
126131
}
127132

128-
// allow task to run once more
129-
sleep(75L)
133+
assertTrue(countDownLatch.await(500L, TimeUnit.MILLISECONDS))
130134
scheduledExecutor.shutdownNow()
131135

132136
val collectedSpans = spanProcessor.toList()

examples/performance-example/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ android {
5353
}
5454

5555
dependencies {
56-
implementation "com.bugsnag:bugsnag-android-performance:1.12.0"
57-
implementation "com.bugsnag:bugsnag-android-performance-okhttp:1.12.0"
58-
implementation "com.bugsnag:bugsnag-android-performance-compose:1.12.0"
56+
implementation "com.bugsnag:bugsnag-android-performance:1.13.0"
57+
implementation "com.bugsnag:bugsnag-android-performance-okhttp:1.13.0"
58+
implementation "com.bugsnag:bugsnag-android-performance-compose:1.13.0"
5959

6060
implementation 'androidx.core:core-ktx:1.7.0'
6161
implementation 'androidx.appcompat:appcompat:1.5.1'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.bugsnag
2-
VERSION_NAME=1.12.0
2+
VERSION_NAME=1.13.0
33

44
POM_SCM_URL=https://github.com/bugsnag/bugsnag-android-performance
55
POM_SCM_CONNECTION=scm:[email protected]:bugsnag/bugsnag-android-performance.git

gradle/release.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ project.afterEvaluate {
1111
publishing {
1212
repositories {
1313
maven {
14-
if (VERSION_NAME.contains("SNAPSHOT")) {
15-
url "https://oss.sonatype.org/content/repositories/snapshots/"
16-
} else {
17-
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
18-
}
14+
name = 'ossrhStaging'
15+
url = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
1916
credentials {
2017
username = project.hasProperty("NEXUS_USERNAME") ? "$NEXUS_USERNAME" : System.getenv("NEXUS_USERNAME")
2118
password = project.hasProperty("NEXUS_PASSWORD") ? "$NEXUS_PASSWORD" : System.getenv("NEXUS_PASSWORD")

0 commit comments

Comments
 (0)