Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: plumb SDK test data branch through to URL used for test config #137

Merged
merged 4 commits into from
Nov 28, 2024

Conversation

typotter
Copy link
Collaborator

No description provided.

@@ -21,8 +21,8 @@ on:
required: false

env:
SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleaning up names for consistency with other repos

@@ -131,7 +131,8 @@ jobs:
touch app/emulator.log # create log file
chmod 777 app/emulator.log # allow writing to log file
adb logcat | grep EppoSDK >> app/emulator.log & # pipe all logcat messages into log file as a background process
./gradlew connectedCheck --no-daemon # run tests
./gradlew connectedCheck --no-daemon \
-Pandroid.testInstrumentationRunnerArguments.TEST_DATA_BRANCH=${{ env.TEST_DATA_BRANCH }} # run tests
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are few options available to pass options at runtime to the connectedCheck. This is the simplest one I could find.

@@ -781,7 +789,7 @@ private void waitForPopulatedCache() {
while (!cachePopulated) {
if (System.currentTimeMillis() > waitEnd) {
throw new InterruptedException(
"Cache file never populated; assuming configuration error");
"Cache file never populated or smaller than expected 8000 bytes; assuming configuration error");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasted a bunch of time trying to figure this out (my test data branch had a very small config).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this "expected 8000 bytes" coming from? first time I'm hearing about it I think

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a check below that checks for a minimum cache file size of 8k

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -781,7 +789,7 @@ private void waitForPopulatedCache() {
while (!cachePopulated) {
if (System.currentTimeMillis() > waitEnd) {
throw new InterruptedException(
"Cache file never populated; assuming configuration error");
"Cache file never populated or smaller than expected 8000 bytes; assuming configuration error");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this "expected 8000 bytes" coming from? first time I'm hearing about it I think

Copy link
Contributor

@aarsilv aarsilv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📈

@@ -22,6 +22,7 @@
import android.util.Log;
import androidx.annotation.Nullable;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.platform.app.InstrumentationRegistry;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Comment on lines +74 to +75
private static final String TEST_BRANCH =
InstrumentationRegistry.getArguments().getString("TEST_DATA_BRANCH");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool did not know about InstrumentRegistry

@typotter typotter enabled auto-merge (squash) November 28, 2024 17:06
@typotter typotter merged commit 080c98a into main Nov 28, 2024
3 checks passed
@typotter typotter deleted the tp/testdatabranch branch November 28, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants