Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4aa3a048
authored
Sep 18, 2020
by
kimvde
Committed by
Oliver Woodman
Sep 21, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add unit tests for Transformer
PiperOrigin-RevId: 332416139
parent
cc10657c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
library/core/src/test/java/com/google/android/exoplayer2/MetadataRetrieverTest.java
library/core/src/test/java/com/google/android/exoplayer2/MetadataRetrieverTest.java
View file @
4aa3a048
...
@@ -31,11 +31,9 @@ import com.google.common.util.concurrent.ListenableFuture;
...
@@ -31,11 +31,9 @@ import com.google.common.util.concurrent.ListenableFuture;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.ExecutionException
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.robolectric.annotation.LooperMode
;
/** Tests for {@link MetadataRetriever}. */
/** Tests for {@link MetadataRetriever}. */
@RunWith
(
AndroidJUnit4
.
class
)
@RunWith
(
AndroidJUnit4
.
class
)
@LooperMode
(
LooperMode
.
Mode
.
PAUSED
)
public
class
MetadataRetrieverTest
{
public
class
MetadataRetrieverTest
{
@Test
@Test
...
@@ -100,7 +98,9 @@ public class MetadataRetrieverTest {
...
@@ -100,7 +98,9 @@ public class MetadataRetrieverTest {
ListenableFuture
<
TrackGroupArray
>
trackGroupsFuture
)
ListenableFuture
<
TrackGroupArray
>
trackGroupsFuture
)
throws
InterruptedException
,
ExecutionException
{
throws
InterruptedException
,
ExecutionException
{
while
(!
trackGroupsFuture
.
isDone
())
{
while
(!
trackGroupsFuture
.
isDone
())
{
// Simulate advancing SystemClock so that delayed messages sent to handlers are received.
// TODO: update once [Internal: b/168084145] is implemented.
// Advance SystemClock so that messages that are sent with a delay to the MetadataRetriever
// looper are received.
SystemClock
.
setCurrentTimeMillis
(
SystemClock
.
uptimeMillis
()
+
100
);
SystemClock
.
setCurrentTimeMillis
(
SystemClock
.
uptimeMillis
()
+
100
);
Thread
.
sleep
(
/* millis= */
100
);
Thread
.
sleep
(
/* millis= */
100
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment