<commit_before>// Copyright 2022, the Chromium project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_ml_model_downloader/firebase_ml_model_downloader.dart';

import 'package:drive/drive.dart';
import 'package:flutter/foundation.dart';
import '../firebase_default_options.dart';

const testModelName = 'mobilenet_v1_1_0_224';

void setupTests() {
  group(
    'firebase_ml_model_downloader',
    () {
      setUpAll(() async {
        await Firebase.initializeApp(
          options: DefaultFirebaseOptions.currentPlatform,
        );
      });

      group('getModel', () {
        test(
          'should return successfully',
          () async {
            await expectLater(
              FirebaseModelDownloader.instance.getModel(
                testModelName,
                FirebaseModelDownloadType.latestModel,
              ),
              completes,
            );
          },
          retry: 2,
          timeout: const Timeout(Duration(seconds: 15)),
        );
      });

      group('listDownloadedModels', () {
        test('should return successfully', () async {<commit_msg>ci: increase ml model downloader test timeout<commit_after>// Copyright 2022, the Chromium project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_ml_model_downloader/firebase_ml_model_downloader.dart';

import 'package:drive/drive.dart';
import 'package:flutter/foundation.dart';
import '../firebase_default_options.dart';

const testModelName = 'mobilenet_v1_1_0_224';

void setupTests() {
  group(
    'firebase_ml_model_downloader',
    () {
      setUpAll(() async {
        await Firebase.initializeApp(
          options: DefaultFirebaseOptions.currentPlatform,
        );
      });

      group('getModel', () {
        test(
          'should return successfully',
          () async {
            await expectLater(
              FirebaseModelDownloader.instance.getModel(
                testModelName,
                FirebaseModelDownloadType.latestModel,
              ),
              completes,
            );
          },
          retry: 2,
          timeout: const Timeout(Duration(seconds: 45)),
        );
      });

      group('listDownloadedModels', () {
        test('should return successfully', () async {
{'fraction_non_alphanumeric': 0.0987887963663891, 'fraction_numerical': 0.00984102952308857, 'mean_word_length': 2.4822134387351777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5455631', 'n_tokens_mistral': 745, 'n_tokens_neox': 722, 'n_words': 170}