Skip to content

Commit 26b4c28

Browse files
committed
log test names in CI
1 parent 7d0ad72 commit 26b4c28

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/test/java/software/amazon/awssdk/crt/test/CrtTestFixture.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@
2323
import org.junit.BeforeClass;
2424
import org.junit.After;
2525
import org.junit.Assume;
26+
import org.junit.Rule;
27+
import org.junit.rules.TestName;
28+
2629

2730
import java.util.Optional;
2831

2932
public class CrtTestFixture {
3033

3134
private CrtTestContext context;
3235

36+
@Rule
37+
public TestName testName = new TestName();
38+
3339
public final CrtTestContext getContext() {
3440
return context;
3541
}
@@ -230,6 +236,7 @@ public static void setupOnce() {
230236
/* The setup function will be run before every test */
231237
@Before
232238
public void setup() {
239+
System.out.println("[TEST START] " + testName.getMethodName());
233240
Log.log(Log.LogLevel.Debug, LogSubject.JavaCrtGeneral, "CrtTestFixture setup begin");
234241

235242
// TODO this CrtTestContext should be removed as we are using System Properties
@@ -258,6 +265,7 @@ public void tearDown() {
258265
}
259266
}
260267
Log.log(Log.LogLevel.Debug, LogSubject.JavaCrtGeneral, "CrtTestFixture tearDown end");
268+
System.out.println("[TEST END] " + testName.getMethodName());
261269
}
262270

263271
protected TlsContext createTlsContextOptions(byte[] trustStore) {

0 commit comments

Comments
 (0)