[ 
https://issues.apache.org/jira/browse/BEAM-3660?focusedWorklogId=173544&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-173544
 ]

ASF GitHub Bot logged work on BEAM-3660:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Dec/18 13:04
            Start Date: 10/Dec/18 13:04
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on a change in pull request #7231: 
[BEAM-3660] Port ReadSpannerSchemaTest off DoFnTester
URL: https://github.com/apache/beam/pull/7231#discussion_r240201036
 
 

 ##########
 File path: 
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/ReadSpannerSchemaTest.java
 ##########
 @@ -119,38 +126,65 @@ public boolean matches(Object argument) {
   @SuppressWarnings("unchecked")
   public void setUp() throws Exception {
     serviceFactory = new FakeServiceFactory();
-    mockTx = mock(ReadOnlyTransaction.class);
-  }
-
-  @Test
-  public void simple() throws Exception {
     // Simplest schema: a table with int64 key
-    ReadOnlyTransaction tx = mock(ReadOnlyTransaction.class);
-    
when(serviceFactory.mockDatabaseClient().readOnlyTransaction()).thenReturn(tx);
-
-    preparePkMetadata(tx, Arrays.asList(pkMetadata("test", "key", "ASC")));
-    prepareColumnMetadata(tx, Arrays.asList(columnMetadata("test", "key", 
"INT64")));
-
-    SpannerConfig config =
+    mockTx = mock(ReadOnlyTransaction.class);
+    
when(serviceFactory.mockDatabaseClient().readOnlyTransaction()).thenReturn(mockTx);
+    preparePkMetadata(mockTx, Arrays.asList(pkMetadata("test", "key", "ASC")));
+    prepareColumnMetadata(mockTx, Arrays.asList(columnMetadata("test", "key", 
"INT64")));
+    config =
         SpannerConfig.create()
             .withProjectId("test-project")
             .withInstanceId("test-instance")
             .withDatabaseId("test-database")
             .withServiceFactory(serviceFactory);
+  }
 
-    DoFnTester<Void, SpannerSchema> tester = DoFnTester.of(new 
ReadSpannerSchema(config));
-    List<SpannerSchema> schemas = tester.processBundle(Arrays.asList((Void) 
null));
+  @Test
+  @Category(ValidatesRunner.class)
 
 Review comment:
   Due to the use of mocks, can this be run on distributed runners? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 173544)
    Time Spent: 20m  (was: 10m)

> Port ReadSpannerSchemaTest off DoFnTester
> -----------------------------------------
>
>                 Key: BEAM-3660
>                 URL: https://issues.apache.org/jira/browse/BEAM-3660
>             Project: Beam
>          Issue Type: Sub-task
>          Components: io-java-gcp
>            Reporter: Kenneth Knowles
>            Assignee: Evgeniy Musin
>            Priority: Major
>              Labels: beginner, newbie, starter
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to