-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
@@ -21,8 +21,8 @@ on: | |||
required: false | |||
|
|||
env: | |||
SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name }} |
There was a problem hiding this comment.
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
.github/workflows/test.yaml
Outdated
@@ -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 |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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
There was a problem hiding this 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
private static final String TEST_BRANCH = | ||
InstrumentationRegistry.getArguments().getString("TEST_DATA_BRANCH"); |
There was a problem hiding this comment.
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
No description provided.