Skip to content

Commit

Permalink
Undo some debugging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedell-newrelic committed Jan 3, 2025
1 parent 6556550 commit 361fbb7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/GHA-Unit-Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Capture build reports (non forked)
# If previous step fails, run this step regardless
# if: failure()
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # pin@v4
with:
name: non-forked-tests-results-java-${{ matrix.java-version }}
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
**/build/reports/jacoco/**
- name: Capture build reports (forked)
# if: failure()
if: failure()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # pin@v4
with:
name: forked-tests-results-java-${{ matrix.java-version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ protected int cacheSizeForTesting() {
return PENDING_ACTIVITIES.asMap().size();
}

protected long getTimeoutMillisForTesting() {
return PENDING_ACTIVITIES.policy().expireAfterWrite().get().getExpiresAfter(TimeUnit.MILLISECONDS);
}

@Override
public void afterHarvest(String appName) {
// do nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ public void testAsyncTransactionServiceTimeout() throws Exception {
assertFalse(ServiceFactory.getAsyncTxService().putIfAbsent("mySecondKey", token));
assertEquals(2, ServiceFactory.getAsyncTxService().cacheSizeForTesting());

// wait for the timeout
// respect whatever the timeout is, even though we tried to set it to 1 second above
// that value may have been set by a previous test (in GHA) and the 1 above will NOT overwrite
// this means it will likely take >3 mins in GHA, but at least it shouldn't fail on the first run every time
// long tokenTimeoutMillis = ServiceFactory.getAsyncTxService().getTimeoutMillisForTesting();
// Thread.sleep(tokenTimeoutMillis + 5000);
Thread.sleep( 5000);

ServiceFactory.getAsyncTxService().cleanUpPendingTransactions();
Expand Down

0 comments on commit 361fbb7

Please sign in to comment.