<commit_before>library redis_pubsub_tests;

import 'dart:async';
import 'package:unittest/unittest.dart';
import 'package:redis_client/redis_client.dart';
import 'helper.dart';
 
main() {

  group('PubSub tests', () {

    RedisClient client;
    
    RedisClient client1;

    setUp(() {
      return RedisClient.connect("127.0.0.1:6379")
          .then((c) {
            client = c;
            client.flushall();
          }).then((a){
             RedisClient.connect("127.0.0.1:6379").then((c1){
               client1 = c1;
             });
          });
    });

    tearDown(() {
     try {
        client.close();
       }
      finally {

      }
    });

    test("publish", () {
      async(
      client.publish("redizzz", "izzzkool").then((val){
        expect(val, equals(0));
      }));
    });
    
<commit_msg>Made sure all open connections are closed after tests ran<commit_after>library redis_pubsub_tests;

import 'dart:async';
import 'package:unittest/unittest.dart';
import 'package:redis_client/redis_client.dart';
import 'helper.dart';
 
main() {

  group('PubSub tests', () {

    RedisClient client;
    
    RedisClient client1;

    setUp(() {
      return RedisClient.connect("127.0.0.1:6379")
          .then((c) {
            client = c;
            client.flushall();
          }).then((a){
             return RedisClient.connect("127.0.0.1:6379").then((c1){
               client1 = c1;
             });
          });
    });

    tearDown(() {
     try {
        client.close();
        client1.close();
       }
      finally {

      }
    });

    test("publish", () {
      async(
      client.publish("redizzz", "izzzkool").then((val){
        expect(val, equals(0));
      }));
    });
    

{'fraction_non_alphanumeric': 0.16493656286043828, 'fraction_numerical': 0.029411764705882353, 'mean_word_length': 1.8868552412645592, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3194316', 'n_tokens_mistral': 593, 'n_tokens_neox': 569, 'n_words': 87}