exchange.Collection FinishPopulation function removed (#436)
* removal of FinishPopulation() method. * graph_connector disconnected from exchange collection internal functions.
This commit is contained in:
parent
4862d5b800
commit
992504ed36
@ -67,15 +67,6 @@ func (eoc *Collection) PopulateCollection(newData *Stream) {
|
||||
eoc.data <- newData
|
||||
}
|
||||
|
||||
// FinishPopulation is used to indicate data population of the collection is complete
|
||||
// TODO: This should be an internal method once we move the message retrieval logic into `ExchangeDataCollection`
|
||||
// TODO: This will be removed as the channel will be filled from calls from exchange.Collection
|
||||
func (eoc *Collection) FinishPopulation() {
|
||||
if eoc.data != nil {
|
||||
close(eoc.data)
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: Refactor has not happened moving into folders
|
||||
// populateFromTaskList async call to fill DataCollection via channel implementation
|
||||
func PopulateFromTaskList(
|
||||
@ -117,8 +108,7 @@ func PopulateFromTaskList(
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
edc.FinishPopulation()
|
||||
close(edc.data)
|
||||
attemptedItems += len(tasks)
|
||||
}
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ func (suite *GraphConnectorIntegrationSuite) TestGraphConnector_ExchangeDataColl
|
||||
suite.Greater(len(exchangeData.FullPath()), 2)
|
||||
}
|
||||
|
||||
//TODO add mockdata for this test... Will not pass as is
|
||||
func (suite *GraphConnectorIntegrationSuite) TestGraphConnector_restoreMessages() {
|
||||
user := "TEST_GRAPH_USER" // user.GetId()
|
||||
file := "TEST_GRAPH_FILE" // Test file should be sent or received by the user
|
||||
@ -92,7 +93,7 @@ func (suite *GraphConnectorIntegrationSuite) TestGraphConnector_restoreMessages(
|
||||
edc := exchange.NewCollection("tenant", []string{"tenantId", evs[user], mailCategory, "Inbox"})
|
||||
|
||||
edc.PopulateCollection(&ds)
|
||||
edc.FinishPopulation()
|
||||
//edc.FinishPopulation()
|
||||
err = suite.connector.RestoreMessages(context.Background(), []data.Collection{&edc})
|
||||
assert.NoError(suite.T(), err)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user